Bug 145265 - Changing the type attribute on an input field causes later events to stop propagation
Summary: Changing the type attribute on an input field causes later events to stop pro...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified OS X 10.10
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-21 07:41 PDT by Charlie
Modified: 2022-08-19 16:12 PDT (History)
5 users (show)

See Also:


Attachments
test case (562 bytes, text/html)
2015-05-22 00:00 PDT, Alexey Proskuryakov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie 2015-05-21 07:41:12 PDT
Changing the type attribute on an input field onfocus causes the click event to stop propagation.

Example: http://jsfiddle.net/7ps7LzrL/6/

I realize that this may be by design, however I was not able to find any documentation about this type of behavior.

Expected Output: The click event would fire after the focus event.

Received Output: The click event is not fired on the input after the focus event.
Comment 1 Alexey Proskuryakov 2015-05-22 00:00:46 PDT
Created attachment 253580 [details]
test case

Same test as an attachment.

For what it's worth, this behavior matches Firefox. I don't know if that's intentional, this seems like a very rare case.
Comment 2 Ahmad Saleem 2022-08-19 15:17:06 PDT
Please find updated results:

*** Safari Technology Preview 151 ***

First click in input filed -> just "focus" event
Second click in input field -> "focus" and then "click" event

*** Chrome Canary 106 ***

First click in input filed -> just "focus" event
Second click in input field -> "focus" and then "click" event

*** Firefox Nightly 105 ***

First click in input filed -> "focus" and then "click" event