Closed
Bug 266951
Opened 20 years ago
Closed 20 years ago
onclick="this.blur();" displays error when input text clicked
Categories
(Toolkit Graveyard :: Error Console, defect)
Tracking
(Not tracked)
VERIFIED
DUPLICATE
of bug 236791
People
(Reporter: mcollins, Assigned: bugs)
Details
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; rv:1.7.3) Gecko/20040913 Firefox/0.10
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; rv:1.7.3) Gecko/20040913 Firefox/0.10
I had an HTML form with:
<input type="text" size="20" name="feed" value="" onclick="this.blur();" />
as I only want to change values in this element via JavaScript and not user
entry. The JavaScript console in FireFox displays an error when the field is
clicked:
"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> ::
onclick :: line 0" data: no]"
The blur() event is supposed to remove keyboard focus from an element and is not
supposed to transfer focus to another element anywhere.
Reproducible: Always
Steps to Reproduce:
1. Create a new HTML page as follows:
<html>
<body>
<form action="action.lasso" method="post" name="form1">
<input type="text" size="20" name="feed" value="" onclick="this.blur();" />
<input type="submit" name="-nothing" value="MyField" />
</form>
</body>
</html>
2. Load in browser
3. Open JavaScript console
4. Click on field
Actual Results:
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> ::
onclick :: line 0" data: no]
Expected Results:
removed cursor from field with no error in the console
The error is only apparent in the JavaScript console, there is no error to
someone using the Web site
Comment 2•20 years ago
|
||
onclick is just the mouse-centric version of onfocus, which makes this a dup of
bug 264060 which is duped (for good or ill) to bug 236791 but what should have
interested you among the dups you should have found before filing is bug 236791
comment 10
*** This bug has been marked as a duplicate of 236791 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Updated•16 years ago
|
Product: Firefox → Toolkit
Updated•8 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•