Version 16 has a bug with inline event handling, such as onChange, onBlur

RESOLVED INVALID

Status

()

RESOLVED INVALID
6 years ago
6 years ago

People

(Reporter: mbakerreg, Unassigned)

Tracking

16 Branch
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Created attachment 672580 [details]
firefoxbug.jpg

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4

Steps to reproduce:

		function getItems() {
			alert("hello");
		}

<select name="jungle" id="jungle" onchange="getItems()">
				<option value="a">A</option>
				<option value="b">B</option>
				<option value="c">C</option>
				<option value="d">D</option>
				<option value="e">E</option>
				<option value="f">F</option>
				<option value="g">G</option>
				</select>


Actual results:

nothing.


Expected results:

there should have been an alert with "hello"

HOWEVER: in some instances it does work.  We have a screen (attached) with multiple onChange events, the first one works, the second one doesn't.  We don't know why - no message in the console, no exceptions reported in the developer tools.
getItems() conflicts with Microdata API which is introduced since Firefox 16.
http://www.w3.org/TR/html5/microdata.html#microdata-dom-api
Blocks: 591467
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → INVALID
Yeah, the problem is that the document is on the scope chain for event handlers....  If you use event handlers, you want to prefix global function calls in them with "window." to avoid problems like this.
You need to log in before you can comment on or make changes to this bug.