|
|
IE6 Triumphs Over Firefox 1.5.0.3 | ||
Discussion by vizskywalker with 5 Replies.
Last Update: June 4, 2006, 7:08 am | |||
![]() |
|
|
The basic rundown:
When events occur on text boxes and some other input types, or certain functions like passing the focus occur on these DOM Elements, certain mishaps can occur. For example, when handling a keypress event from a textbox and calling an alert, an exception is thrown.
The message:
CODE
Error: [Exception... "'Permission denied to set property XULElement.selectedIndex' when calling method: [nsIAutoCompletePopup::selectedIndex]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: [url=http://localhost/developement/assume/shoutbox/scripts/addshout.js]http://localhost/developement/assume/shout...pts/addshout.js[/url] :: anonymous :: line 37" data: no]The line in question is the line containing the alert.
This is technically only a warning, but as this can stack up in the javascript console, it can cause a Firefox slowdown.
Analysis:
The key piece of the exception is "nsIAutoCompletePopup::selectedIndex". For some reason, when autocomplete is not turned off on a textbox, the alert for some unknown reason attempts to access it and fails.
The workaround is to use a tag like this:
<input type="text" autocomplete="off">
There are two problems with this. The first is that autocomplete is not a valid XHTML property, so it will invalidate your XHTML. The second is that like it seems, this turns off autocomplete, which you might want to leave on.
The final word:
IE6 does not have this problem, and theoretically neither should Firefox as it is not improper code in any way shape or form. I do not remember this in earlier versions of firefox, so hopefully it will be resolved in the next firefox, as it seems to be a common solution. I am still unsure of what exactly NS_ERROR_JS_THREW_STRING really means, but I will post if I found out.
The recommendation:
If you see this error in the javascript console, post here describing what caused the exception, and simply try to avoid those kinds of programming. If you must use that specific piece of programming, simply ignore the exception as it is a warning only and doesn't accurately represent a problem.
~Viz
I'm pretty sure, this little issue will be fixed in the next issue of Firefox if you send them a bug report. That's what I love about Firefox (and other open source software): If there is something wrong, it certainly won't be that way for long.
I'm still waiting for Apple to fix some bugs with correct code in my website. It's unbelievable: Safari does not know the attribute 'disabled="disabled"' for the element <button>. Plus there are some weird things happening if you put your computer to 'Sleep' with Safari running. Gets on my nerves, because it really screwed up my website at times. Still, Safari is just faster than Firefox on my Mac =).
edit: wrote excepting instead of expecting. happens every damn single time...
~Viz
By the way, what is the thing with Mozilla Corp.? I read on their website, that Firefox and Thunderbird are there now and it is a wholly owned company with core employees, etc. Is that a good development? I know too little to judge.
NOTE: Since this is the BETA version, it lacks some standard functionality that IE6 has, but this will be upgraded on the final version.
Similar Topics:
Firefox Problems
Wonders Of Firefox
Make Sure Your Name Will Be There ...
How To Run A Proxy On a Web-Server? How to make a proxy on website (22)
|
(9) Wonders Of Firefox Newly Switched from IE to Firefox
|
HOME 






