Closed Bug 1208789 Opened 4 years ago Closed 4 years ago

Unreachable code after return in browser_documentnavigation.js

Categories

(Core :: User events and focus handling, defect)

defect
Not set
Points:
1

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: MattN, Assigned: enndeakin)

References

(Depends on 1 open bug, )

Details

Attachments

(1 file)

There is dead code after a return at http://hg.mozilla.org/mozilla-central/annotate/6457f01e4bcb/browser/base/content/test/general/browser_documentnavigation.js#l108 which causes a warning.

108   return ContentTask.spawn(gBrowser.selectedBrowser, { }, function* () {
109     return content.document.getElementById("button1").focus();
110   });
111 
112   yield* expectFocusOnF6(false, "main-window", gURLBar.inputField,
113                                 false, "basic focus content page with button focused urlbar");
…
Flags: needinfo?(enndeakin)
Turns out this was masking an actual bug, that can be reproduced as follows:

1. Load a page and tab to it such that the document is focused (focus ring on document)
2. Click the urlbar to focus it
3. Press Shift+F6

Actual: Nothing appears to happen.
Expected: The document is focused again.
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Flags: needinfo?(enndeakin)
Attachment #8667035 - Flags: review?(bugs)
Points: --- → 1
Attachment #8667035 - Flags: review?(bugs) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/8305fc7ffd1c2adc305f9047276dd2c1aed3c1c5
Bug 1208789, clear starting node before traversing backwards by document, r=smaug
https://hg.mozilla.org/mozilla-central/rev/8305fc7ffd1c
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.