onblur blocking onclick event

RESOLVED INCOMPLETE

Status

()

Firefox
General
RESOLVED INCOMPLETE
9 years ago
7 years ago

People

(Reporter: Robert Rothenberg, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [CLOSEME 2010-11-01])

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.0.7) Gecko/2009030423 Ubuntu/8.10 (intrepid) Firefox/3.0.7
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.0.7) Gecko/2009030423 Ubuntu/8.10 (intrepid) Firefox/3.0.7

I have forms with onfocus/onblur events that resize the form fields when focused/blurred. The problem occurs when focus is blurred by the user attempting to click a button.  The button's onclick event is blocked by the onblur handler, meaning that the user has to press the button twice.

This appears to be related to Bug 456523.

Reproducible: Always

Steps to Reproduce:
1. Focus on a form element with an onfucus event
2. Leave form element by clicking mouse button

Actual Results:  
onblur event called, but not onclick event. User must click button a second time.

Expected Results:  
onblur event called, and then onclick event.
(Reporter)

Comment 1

9 years ago
Created attachment 368912 [details]
An example HTML file that one can test this problem

I've noticed when the onfocus event is removed, then this bug does not occur. So perhaps it is something to do with the layout engine interfering with the onclick event by redrawing the form.

Comment 2

9 years ago
It's actually because the click event fires on mouseup and changing the textbox size causes the button to move such that the mouseup doesn't occur over the button anymore.

Both Safari and IE also behave this way so I wouldn't say that this is a bug.
(Reporter)

Comment 3

9 years ago
(In reply to comment #2)
> It's actually because the click event fires on mouseup and changing the textbox
> size causes the button to move such that the mouseup doesn't occur over the
> button anymore.

That sounds right.
 
> Both Safari and IE also behave this way so I wouldn't say that this is a bug.

I've noticed it on other browsers too. But barring something explicit stating that this is the correct behavior in the DOM specification, I would say that it is a bug: what happens when you press a button, and what a user naturally expects to happen are different.

What is the workaround then?
This is a mass search for bugs which are in the Firefox General component, are
UNCO, have not been changed for 500 days and have an unspecified version. 

Reporter, can you please update to Firefox 3.6.10 or later, create a fresh profile, http://support.mozilla.com/en-US/kb/managing+profiles, and test again. If you still see the issue, please update this bug. If the issue is gone, please set the status to RESOLVED > WORKSFORME.
Whiteboard: [CLOSEME 2010-11-01]
No reply from reporter, INCOMPLETE. Please retest with Firefox 3.6.12 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.