ONCHANGE event incorrect triggered

RESOLVED WORKSFORME

Status

()

Core
Event Handling
RESOLVED WORKSFORME
11 years ago
8 years ago

People

(Reporter: Ned, Unassigned)

Tracking

1.8 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2

The ONCHANGE event triggers incorrectly in an INPUT TEXT box whenever there is both an ONFOCUS event also set, and a VALUE set in the tag

Reproducible: Always

Steps to Reproduce:
1. create tag: <INPUT type="text" id=text1 name=text1 value='any value' onchange="alert('onchange');" onfocus="alert('onfocus');">
2. move focus to the tab incorrrectly triggers ONCHANGE event

Actual Results:  
ONCHANGE event is incorrectly triggered, then the ONFOCUS event

Expected Results:  
ONCHANGE event should not be triggered, only the ONFOCUS event

Comment 1

11 years ago
On Mac trunk, I just get an infinite loop of onfocus events due to the alert().  I think that's bug 302787.

If I change the alert() to dump(), like this:

<INPUT type="text" id=text1 name=text1 value='any value'
onchange="dump('onchange\n');" onfocus="dump('onfocus\n');"> 

I don't see any spurious onchange events.
Assignee: nobody → events
Component: Build Config → Event Handling
Product: Firefox → Core
QA Contact: build.config → ian
Version: unspecified → 1.8 Branch
Assignee: events → nobody
QA Contact: ian → events
WFM, Firefox trunk builds on Linux and OSX.

-> WORKSFORME
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.