Open Bug 1230520 Opened 9 years ago Updated 2 years ago

During alert() in a nested compositionend listener, the DOM responds to the keyboard

Categories

(Core :: DOM: Events, defect)

42 Branch
x86_64
Linux
defect

Tracking

()

People

(Reporter: david, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/45.0.2454.101 Chrome/45.0.2454.101 Safari/537.36

Steps to reproduce:

1. On Ubuntu 15.10, go to http://jsfiddle.net/rkprkmbs/1/ .
2. Trigger a compositionstart event (preferably with no compositionend event in the same tick)
3. An alert dialog saying '2 compositionend' will appear. With this alert dialog active, try typing and cursoring with the keyboard.


Actual results:

The DOM responds to the keyboard input with the alert dialog active; i.e. cursoring modifies the selection and typing inserts text.

Note: The compositionstart listener calls alert( '1 compositionstart' ), which presumably triggers the compositionend event before showing the dialog. The compositionend listener calls alert( '2 compositionend' ) , which is the first alert to actually appear. When the '1 compositionstart' alert dialog is dismissed, there will be a segfault due to bug 1230473, but that is probably unrelated to the present bug.


Expected results:

The DOM should not respond to keyboard input when the alert dialog is active.
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

Hi David,

This issue was a tough nut to crack. I have used your test case to test this issue using latest Firefox release (42.0) on Ubuntu 10.04 and I have managed to reproduced it. 
However I tried to test this also on latest Nightly build (45.0a1-20151207030210) and could not reproduce it. On the Nightly build The first displayed alert dialog was "3 compositioned" and I could not write at any level of alert. 

After some diggings I found out that the issue was fixed since Nightly build 36.0a1 (from 2014-11-07) but it wasn't uplifted since (pushlog - https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=2114ef80f6ae&tochange=b62ccf3228ba). 
I have tested this also on the latest Firefox beta (43.0b9) build, and it still occurs, so the fix will not be available in next Firefox release at this point.

I'm assigning this issue to the right product and component. Maybe someone with more knowledge on this could give us more details if it could be or not uplifted in the next release, and what are the risks.


Thanks,
Paul.
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Events
Ever confirmed: true
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → x86_64

This appears to be fixed now. I tested on Ubuntu 18.04.1 LTS, with both official and Ubuntu builds of Firefox:

Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.