Bug 145265

Summary: Changing the type attribute on an input field causes later events to stop propagation
Product: WebKit Reporter: Charlie <blevins.charlie>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, cdumez, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: OS X 10.10   
Attachments:
Description Flags
test case none

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