Closed
Bug 795399
Opened 12 years ago
Closed 12 years ago
touch events go through overlays to the elements below
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: djf, Unassigned)
Details
Attachments
(1 file)
(deleted),
text/plain
|
Details |
:smaug you're cc'ed because fabrice said I should cc you. I don't know if you're the right person, and I don't even know if I have the product and component right. This may be a B2G specific bug, or maybe something more general.
In my Gaia Gallery app, I display a full-screen overlay when the sdcard is empty or unavailable. The point of this is to tell the user what is happening, but more importantly to capture all input events so they can't click on any controls.
The overlay is just an absolutely-positioned translucent <div> on top of the rest of the UI.
In b2g-desktop, it intercepts all click events and does what it should.
On the otoro device, however, touch events just go right through it and the user can still interact with the UI even though there is this overlay on top.
Switching off OOP didn't make a difference.
Setting the z-index didn't make a difference.
Registering a touchstart event handler on the overlay didn't make a difference either. The handler was never actually triggered.
What did make a difference, and the workaround I'm going to be using in my app, is registering a click event handler on the overlay. With the click handler registered my touch events are not getting through to the UI below, which is what I wanted.
I shouldn't have to do that, though.
Comment 2•12 years ago
|
||
I mean something which works on desktop FF.
(it should work like non-OOP b2g)
Reporter | ||
Comment 3•12 years ago
|
||
What kind of test case do you want? Something that works on desktop and fails in the b2g browser, maybe? Do you have a device you could run such a testcase on?
Comment 4•12 years ago
|
||
well, mochitest perhaps?
Comment 5•12 years ago
|
||
but just seeing some code would help.
(I don't have any Android or b2g devices atm.)
Reporter | ||
Comment 6•12 years ago
|
||
I can't trigger the bug with a regular webpage in the b2g browser app.
So I'm about to attach a test case that is a trivial Gaia app. It is a patch to the "Template" app. Apply the patch to a Gaia branch, push to a device and then launch the template app. You'll see a button underneath a translucent overlay. But clicking on the button works. The same code behaves differently in a browser.
With no device you may need to assign someone else to this bug, I suppose.
Reporter | ||
Comment 7•12 years ago
|
||
Comment 8•12 years ago
|
||
I don't even know where the code for Gaia lives ;) Somewhere outside Mozilla, in github or something.
But I'll read through the hit testing code.
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Comment 9•12 years ago
|
||
Tested in the relevant apps and with the test patch, all working fine now
Assignee | ||
Updated•6 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
•