Unexplainable error in Mozilla

S

Stefan Mueller

Why do I get the following error message in Mozilla if I press a key in the
input box?

================================

Error: [Exception... "'Permission denied to get property
XULElement.selectedIndex' when calling method:
[nsIAutoCompletePopup::selectedIndex]" nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame ::
file:///D:/test/index.html :: message :: line 4" data: no]
Source File: file:///D:/test/index.html
Line: 4

================================

<html>
<script type="text/javascript">
function showmessage() {
alert("Why does Mozilla report an error?")
}

</script>

<body>
<form name="myform">
<input type="text" name="myinputbox" value=""
onKeyPress="showmessage()">
</form>
</body>
</html>

================================

What's wrong with my code?
Stefan
 
X

Xandax

I get that occasional when using the focus() function to set focus to
some elements in FireFox.
I've yet to find a solution to it anywhere, so if you find one I'd be
most interested :D
 
V

VK

Xandax said:
I get that occasional when using the focus() function to set focus to
some elements in FireFox.
I've yet to find a solution to it anywhere, so if you find one I'd be
most interested :D


Try not to pay too much attention to that ;-) The guys are making XPCom
/ XPConnect right "on the go" and right on the current browser version
using their users as laboratory rats. A semi-questionnable approach but
proven by companies like Microsoft to be the most results effective.
:)

More precisely it's an XPConnect security interface is leaking. When
starting to type anything in a form field it leads to autocomplete call
which in an "out-of-sandbox" situation has to run security check for
UniversalPropertyRead privilege (but should stay quiet in the regular
situation).

Report it to bugzilla.mozilla.org and try to forget it for now (?)


P.S. As it doesn't stop script execution we have to mark that with this
bug FireFox introduces new program flow event besides Error: a
Perl-like Warning. So there is nothing bad without something good in it
:)
 
X

Xandax

Hmm - not really a suitible solution for my case seeing as customers
often wants autocomplete, but perhaps I can turn some completion off in
some of my fields and perhaps reduce the number of exceptions I get.

But as said by the previous poster (VK), it doesn't break script
execution (thank god :D), so I can live with it, it just annoys me :D
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,050
Members
48,769
Latest member
Clifft

Latest Threads

Top