Closed Bug 1590435 Opened 6 years ago Closed 6 years ago

Preventing default for click events on GeckoView browsers prevents <select> options from opening

Categories

(GeckoView :: General, defect, P1)

Unspecified
Android
defect

Tracking

(Webcompat Priority:?, firefox70 wontfix, firefox71 wontfix, firefox72 fixed)

RESOLVED FIXED
mozilla72
Webcompat Priority ?
Tracking Status
firefox70 --- wontfix
firefox71 --- wontfix
firefox72 --- fixed

People

(Reporter: amejia, Assigned: droeh)

References

Details

(Whiteboard: [geckoview:m1911])

Attachments

(1 file)

Webcompat Priority: --- → ?

Arturo says he can reproduce in both Fenix and GVE.

Temporarily assigning to Dylan because he offered to test.

Assignee: nobody → droeh

Adding this to the November sprint after talking with Emily.

Whiteboard: [geckoview:m1911]

smaug, can you offer some insight here -- from MDN[0] it sounds to me like this is actually working as intended in GV, and desktop is broken. In particular, the behavior of the checkbox in the MDN example is the same on both desktop and GV (it prevents a user from interacting with the checkbox) and is in line with what GV is doing with the select example Arturo provided. Am I misunderstanding the intended behavior here? (And if so, why wouldn't this prevent the default action when clicking on the select?)

Flags: needinfo?(bugs)

P1 because Dylan says he is working on this bug.

OS: All → Android
Priority: -- → P1

Did you forget to add some link? And I don't quite understand the question. Comment 3 talks about checkbox, but this bug is about <select>.
Checkbox has its own very weird behavior, because of legacy (search for "The legacy-pre-activation behavior for input elements are these steps:" in html spec https://html.spec.whatwg.org/).
And whether or not <select> reacts to click is defined in HTML too - there is no activation behavior, so it doesn't deal with click.

Calling preventDefault() on mousedown is supposed to prevent select to open, or at least browsers do that, though it doesn't seem to be in the spec. And mousedown makes sense here, since that is when the popup opens, not after mouseup.

Flags: needinfo?(bugs) → needinfo?(droeh)

Ah, yes, I meant to add https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault and forgot, for the checkbox example. But you clarified things for me anyways with the comment about the popup opening on mousedown -- thanks!

Flags: needinfo?(droeh)
Pushed by droeh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dc73a80c1fef Remove defaultPrevented check in GeckoViewPrompt's click handler. r=geckoview-reviewers,snorp
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72

firefox71=wontfix because I assume there is no urgent need to uplift this <select> fix to GV Beta (71).

Component: GeckoViewExample → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: