зеркало из https://github.com/mozilla/gecko-dev.git
Bug 211852 and bug 212626. Tab and shift+tab not working with sub documents. r=bryner, sr=bz
This commit is contained in:
Родитель
df20768272
Коммит
718fd8dd01
|
@ -5005,15 +5005,15 @@ NS_IMETHODIMP nsEventStateManager::MoveCaretToFocus()
|
|||
nsCOMPtr<nsIFrameSelection> frameSelection;
|
||||
shell->GetFrameSelection(getter_AddRefs(frameSelection));
|
||||
|
||||
if (currentFocusNode && frameSelection && rangeDoc) {
|
||||
if (frameSelection && rangeDoc) {
|
||||
nsCOMPtr<nsISelection> domSelection;
|
||||
frameSelection->GetSelection(nsISelectionController::SELECTION_NORMAL,
|
||||
getter_AddRefs(domSelection));
|
||||
if (domSelection) {
|
||||
// First clear the selection
|
||||
domSelection->RemoveAllRanges();
|
||||
nsCOMPtr<nsIDOMRange> newRange;
|
||||
if (currentFocusNode) {
|
||||
nsCOMPtr<nsIDOMRange> newRange;
|
||||
nsresult rv = rangeDoc->CreateRange(getter_AddRefs(newRange));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
// Set the range to the start of the currently focused node
|
||||
|
|
Загрузка…
Ссылка в новой задаче