Closed Bug 270696 Opened 20 years ago Closed 20 years ago

error and infinte loop when accessing element attributes from within onfocus code

Categories

(Toolkit :: Form Manager, defect)

defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 236791

People

(Reporter: bugzilla, Assigned: bugs)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

An error is raised when accessing element attributes, only if the code
originates from an onfocus event. Possibly a seperate bug, if the offending code
is within an alert() call, an infinite loop is entered into, with quitting the
browser the only recourse.

Reproducible: Always
Steps to Reproduce:
I will attach a file demonstrating this



The error code is:

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 :: <unknown filename> ::
onfocus :: line 0"  data: no]
The error message is covered by Bug 236791. How do you manage to get an infinite 
loop?
Assignee: general → bugs
Component: DOM: HTML → Form Manager
OS: MacOS X → All
Product: Browser → Firefox
QA Contact: ian → firefox.form-manager
Hardware: Macintosh → All
Attached file Test HTML
OK - I am being a retard, I lost the bug ID so couldn't attach a demo. Hey, I
was tired!

The attached file is a demo. WARNING! locks up the window in an alert loop so
you have to forcefully close it.

The infinite loop is the result of code being called from an onfocus event - a
seperate issue. After an alert, the element in focus refocuses. Is this a bug?
It might be, I'm not sure what the Right Thing is.

The error is a real, but minor bug. Code called from within an alert() call
inside text input events cannot access attributes, and the error is shown in the
JavaScript console.
Ok, these are two separate problems. As I already said, the error message is bug 
236791, the infinite loop is probably Bug 185761.
*** Bug 270700 has been marked as a duplicate of this bug. ***
Yup, seems to be a dupe of both bugs, sorry.

*** This bug has been marked as a duplicate of 236791 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
v.
Status: RESOLVED → VERIFIED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: