Closed Bug 137432 Opened 24 years ago Closed 24 years ago

Warning in Chrome when switching visibility

Categories

(Core :: DOM: CSS Object Model, defect)

x86
Windows NT
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ggb.mzl, Assigned: jst)

References

()

Details

I have opened a new bug report for the seperate parts of BUG 136041 to allow the seperate issues to be resolved independently. Refer to bug 136041 for resources associated with this problem. I have a script that starts with a number of DIV sections positioned to the same screen location (all within the same TABLE <TD></TD> section). Each of these DIV sections is selectively (depending upon required state) hidden or visible, with only one of them visible at one time. When DIV sections are switched between hidden and visible, it invokes an error in the CHROME. I have disabled the viewing of CHROME errors, but this still causes a blank error screen to be displayed. When CHOME errors are enabled, the following error is listed: Warning: reference to undefined property this.pageData[aPageTag] Source File: chrome://global/content/nsWidgetStateManager.js Line: 64
Sorry, I listed the warning at the top of the report, but neglected to list the errors leading up to that error. These are (hopefully I don't miss ant out, because the errors are repeated and I shall not include the repeats): Warning: reference to undefined property item.selected Source File: chrome://global/content/bindings/listbox.xml#listbox.addItemToSelection() Line: 5 Warning: function SwitchPacks does not always return a value Source File: chrome://content-packs/content/pref-contentpacks.xul Line: 138, Column: 4 Source Code: } Warning: redeclaration of var observerService Source File: chrome://content-packs/content/pref-contentpacks.xul Line: 131, Column: 14 Source Code: var observerService = Components.classes["@mozilla.org/observer- service;1"].getService(Components.interfaces.nsIObserverService); Warning: redeclaration of var chromeRegistry Source File: chrome://content-packs/content/pref-contentpacks.xul Line: 129, Column: 14 Source Code: var chromeRegistry = Components.classes["@mozilla.org/chrome/chrome- registry;1"].getService(Components.interfaces.nsIChromeRegistry); Warning: redeclaration of var selectedItem Source File: chrome://content-packs/content/pref-contentpacks.xul Line: 117, Column: 13 Source Code: var selectedItem = languageList.selectedItems.length ? languageList.selectedItems[0] : null; Error: redeclaration of const hide Source File: chrome://wallet/content/walletOverlay.js Line: 1
George, I cannot reproduce the nsWidgetStateManager.js warning or the contentpacks warnings. The walletOverlay error is bug 112908, and that's not triggered by the steps listed in bug 136041 either....
I am not sure what more you need from me to show the problem. I am just now rerunning the scenario again, to prove to myself the steps I took to get there. I dragged the file gb_cv_Edit_SkillGroup.html onto the Mozilla icon on my desktop (Mozilla is not my default browser, and is not configured for quick start up). I am prompted with the 'Select User Profile' screen, where I have 2 profiles, GGB, and DEFAULT. I select GGB and click on 'Start Mozilla'. The first screen comes up. I click on 'Add New Group'. The page changes, but also the error pops up: Error: redeclaration of const hide Source File: chrome://wallet/content/walletOverlay.js Line: 1 I click to clear the error, close the error console, and return to the browser. I click on 'Cancel', and an empty JavaScript console pops up. I close the Javascript Console and return to the browser. I click on 'Add New Group' again. An empty JavaScript console pops up again. I'm not sure why I'm not getting all the other warnings I got last time, but I certainly didn't invent the other warnings, and there is no question that at least the WalletOverlay error is happening consistently (in a very different context to that mentioned in bug 112908). It is also the case that the JavaScript console is popping up even when no new errors are being displayed. The same happens when I select the default profile, rather than profile GGB.
I do see the JS console popping up. Looking into that. :)
OK, the deal here is that the <a> has: onclick="click_Add(this);" href="javascript:" The onclick handler does not return false, so we follow the href. An href of javascript: brings up the JS console. That's correct behavior (NS4 does it), see bug 59748. Just making JSAction() append a "return false;" to the handler will prevent this behavior. Alternately, you could make JSAction() create something like: onclick="return click_Add(this);" and return false in the click_Add function.
Thanks!
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.