Closed
Bug 613748
Opened 14 years ago
Closed 14 years ago
Keyboard inputs do not work when tab-modal alerts are open in another tab
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
FIXED
mozilla2.0b8
Tracking | Status | |
---|---|---|
blocking2.0 | --- | beta8+ |
People
(Reporter: josh.tumath+bugzilla, Assigned: enndeakin)
References
()
Details
Attachments
(2 files, 1 obsolete file)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101120 Firefox/4.0b8pre Build Identifier: Keyboard inputs do not work when tab-model alerts are open in another tab. Reproducible: Always
Reporter | ||
Updated•14 years ago
|
Comment 1•14 years ago
|
||
Cannot reproduce on Mozilla/5.0 (Windows NT 6.1; rv:2.0b8pre) Gecko/20101120 Firefox/4.0b8pre. If I run "javascript:alert(1)" on google.com homepage and do not discard it, I can still write in here.
Reporter | ||
Comment 2•14 years ago
|
||
Then maybe this bug has a more specific problem. Here is how to reproduce it:- 1. Open http://acid3.acidtests.org/ 2. When the test completes, click on "A" to open the alert. 3. Go to the tab with this bugzilla page in it, and try to type in the comments textarea.
Comment 3•14 years ago
|
||
Confirming with the Acid3 testcase.
Comment 4•14 years ago
|
||
As seen in this testcase the bug does not occur when using a link (<a>), but does occur when using a <h1> or any other element I have tested.
Updated•14 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•14 years ago
|
Summary: Keyboard inputs do not work when tab-model alerts are open in another tab → Keyboard inputs do not work when tab-modal alerts are open in another tab
Updated•14 years ago
|
OS: Windows 7 → All
Hardware: x86_64 → All
Comment 7•14 years ago
|
||
Seems like the alert needs to come from an onclick handler and not just a plain alert: breaks: data:text/html,<p onclick="alert(0)">Foo</p> okay: data:text/html,<script>alert(0)</script>
Comment 8•14 years ago
|
||
Something interesting I noticed when clicking on Bugzilla's URL data URI warning.. Fails with href: data:text/html,<a onclick="confirm(0)">Foo</a> Happens to work when there's no href (like with bugzilla): data:text/html,<a href="/" onclick="confirm(0)">Foo</a>
Assignee | ||
Comment 9•14 years ago
|
||
What is happening is that nsPresShell::sDontRetargetEvents is being set (to prevent recursion) but it isn't being cleared until after the modal prompt closes thus, events don't get retargeted to the right focused window. This should be changed to use an argument instead of a global flag.
Assignee | ||
Comment 10•14 years ago
|
||
Let's try out this patch to see if it fixes some issues.
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Comment 11•14 years ago
|
||
Oops, Enn's patch needed one obvious change to nsDOMWindowUtils.cpp to compile. But WFM with the testcase here.
Attachment #492440 -
Attachment is obsolete: true
Updated•14 years ago
|
Component: General → Event Handling
Product: Toolkit → Core
QA Contact: general → events
Comment 12•14 years ago
|
||
Comment on attachment 492469 [details] [diff] [review] Patch v.2 bz suggested smaug would be best to look at this. FWIW, I pushed this to try, seems to be doing fine there. Also noted that this changes a (native) API, so I'll email drivers. Seems like this should ok, it's a big win (tab-modal prompts), and should only potentially effect binary addons (and the fix for them is easy).
Attachment #492469 -
Flags: review?(Olli.Pettay)
Updated•14 years ago
|
Attachment #492469 -
Flags: review?(Olli.Pettay) → review+
Updated•14 years ago
|
Whiteboard: [has patch][has review]
Comment 13•14 years ago
|
||
Sent email to releave-drivers for approval of the interface change, a=bsmedberg.
Comment 14•14 years ago
|
||
Pushed http://hg.mozilla.org/mozilla-central/rev/34447b39697a Thanks Enn!
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [has patch][has review]
Target Milestone: --- → mozilla2.0b8
Updated•5 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•