Open Bug 850359 Opened 12 years ago Updated 3 years ago

Changing the type of <input type=range> in the middle of touchstart/touchend breaks event delivery

Categories

(Core :: DOM: Forms, defect, P5)

All
Android
defect

Tracking

()

People

(Reporter: jwatt, Unassigned)

Details

Attachments

(1 file)

It seems like changing the type of <input type=range> in the middle of touchstart/touchend breaks event delivery in Firefox Mobile on Android.
Here's the mochitest (as a patch) that I've being using to debug this.
The test basically sends a touchstart to an <input type=range>, then changes the input's type from "range" to "text" then back to "range", and then finally sends a touchend event to the input. The expectation is that the touchend should reach nsHTMLInputElement::PostHandleEventForRangeThumb, but in fact the touchend isn't dispatched to the document at all.
What's going on here is that <input type=range> has anonymous <div> elements that act as the thumb and track for the range. When the touchstart occurs, one of the anonymous divs is hit and set as the capturing element for all future touch events until the capturing is canceled by a touchend. The problem with changing the type of the <input> between the touchstart and touchend is that the anonymous divs are detached from the document (the have no parent nodes any more). As a result, when the touchend occurs, it is sent to the out-of-document div, and naturally the event never reaches the <input>, or even the document. I'm not sure what the best way to fix this is. Wes, smaug, any thoughts?
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM: Core & HTML → DOM: Forms
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: