function focusInit() in toolkit.jar causes exception under certain circumstances

RESOLVED DUPLICATE of bug 550539

Status

()

Firefox
General
RESOLVED DUPLICATE of bug 550539
8 years ago
8 years ago

People

(Reporter: skmail, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.2) Gecko/20100316 Firefox FoxOnFlames ( .NET CLR 3.5.21022)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.2) Gecko/20100316 Firefox FoxOnFlames ( .NET CLR 3.5.21022)

Error: focusedElt is null
Source file: chrome://global/content/bindings/dialog.xml
Line: 155

Badly designed FF function:

          function focusInit() {
            const dialog = document.documentElement;
            const defaultButton = dialog.getButton(dialog.defaultButton);
            // give focus to the first focusable element in the dialog
            if (!document.commandDispatcher.focusedElement) {
              document.commandDispatcher.advanceFocusIntoSubtree(dialog);

              var focusedElt = document.commandDispatcher.focusedElement;
              var initialFocusedElt = focusedElt;

/* SOMETIMES focusedElt IS STILL NULL HERE */

              while (focusedElt.localName == "tab" ||




Reproducible: Sometimes

Steps to Reproduce:
1. Install BetterPrivacy addon
2. Install 'Download Statusbar' addon
3. Try to open BetterPrivacy main window

....if the window is empty, you will find the error logged in console (NOTE: not a addon bug!)
Actual Results:  
sometimes empty window

Expected Results:  
options window

Updated

8 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 550539
You need to log in before you can comment on or make changes to this bug.