Closed Bug 961784 Opened 7 years ago Closed 7 years ago

Various event listeners from shell.html don't work when loading it in a firefox tab

Categories

(Firefox OS Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(1 file, 1 obsolete file)

When running b2g in the mulet (bug 943878), various event listeners fails and are never triggered. Listening on the system app frame for touch events, or listening on shell.html global window for key events aren't working.
For both cases, we have to listen on the chrome event handler, which is the firefox tab <browser> element.
Attached patch listen on chrome event handler (obsolete) — Splinter Review
Attachment #8362589 - Flags: review?(fabrice)
Comment on attachment 8362589 [details] [diff] [review]
listen on chrome event handler

Review of attachment 8362589 [details] [diff] [review]:
-----------------------------------------------------------------

::: b2g/chrome/content/desktop.js
@@ +1,1 @@
>  

This file lacks a license block. Let's add it now.
Attachment #8362589 - Flags: review?(fabrice) → review+
Comment on attachment 8362589 [details] [diff] [review]
listen on chrome event handler

Review of attachment 8362589 [details] [diff] [review]:
-----------------------------------------------------------------

::: b2g/chrome/content/desktop.js
@@ +7,5 @@
>    let { TouchEventHandler } = require("devtools/touch-events");
> +  let chromeEventHandler = window.QueryInterface(Ci.nsIInterfaceRequestor)
> +                                   .getInterface(Ci.nsIWebNavigation)
> +                                   .QueryInterface(Ci.nsIDocShell)
> +                                   .chromeEventHandler || window;

uber-nit: alignment with .QueryInterface(Ci.nsIInterfaceRequestor) :)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/c84a7374ac9f
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.