Skip to content

Loading…

FIX: copy gaia/profile-debug/user.js to addon/template/profile #852

Merged
merged 1 commit into from

2 participants

@rpl
Mozilla member

Gaia user preferences generated by "gaia/build/preferences.js" are now located on "gaia/profile-debug/user.js" and needs to be copied over "addon/template/profile/user.js" to activate custom desktop-helper preferences.

b2g-desktops doesn't enable dom.w3c_touch_events by default, and if the preference is not set to 1, "document.createEvent('touchevent')" raise a NotSupportedError:

console.error: fxos_1_2_simulator:
JavaScript error: chrome://desktop-helper.js/content/touch-events.js, line 167: 
NotSupportedError: Operation is not supported

Using "dom.w3c_touch_events.enabled=1" fix the exception and "chrome://desktop-helper.js/content/touch-events.js" emulation helper works again (e.g. the FirefoxOS statusbar can be dragged again).

Reported on:

Tested on:

  • Linux (Ubuntu 13.04)
  • Firefox Nightly 27.0a1 (2013-09-29)
@ochameau
Mozilla member

Oh that's weird, gaia's build system should be setting this pref over here:
https://github.com/mozilla-b2g/gaia/blob/master/build/preferences.js#L70
And this block should be executing as we pass the DESKTOP=1 flag there:
https://github.com/mozilla/r2d2b2g/blob/master/Makefile#L146

@rpl
Mozilla member

@ochameau I see, I'll look deeper into the building process to detect why it doesn't set the preference as expected

@rpl rpl FIX: copy gaia/profile-debug/user.js to addon/template/profile (fix N…
…otSupportedError on desktop-helper touch-events.js)

Gaia user preferences generated by "gaia/build/preferences.js"
are now located on "gaia/profile-debug/user.js" and needs to be
copied over "addon/template/profile/user.js" to activate
custom desktop-helper preferences.

"dom.w3c_touch_events.enabled=1" user_pref fix the exception and
touch-events.js emulation helper from desktop-helper works again
(e.g. the FirefoxOS statusbar can be dragged again).
e4d2239
@rpl
Mozilla member

@ochameau Got it ;-)

Gaia user preferences generated by "gaia/build/preferences.js" are now located on "gaia/profile-debug/user.js" and needs to be copied over "addon/template/profile/user.js" to activate custom desktop-helper preferences.

In e4d2239 I've pushed the correct fix (a minimal Makefile tweak)

@ochameau
Mozilla member

Great! Thanks for figuring this out so quickly :-)

Btw, with this patch you are fixing this bugzilla ticket:
https://bugzilla.mozilla.org/show_bug.cgi?id=926540

@ochameau ochameau merged commit c07aae1 into mozilla:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 21, 2013
  1. @rpl

    FIX: copy gaia/profile-debug/user.js to addon/template/profile (fix N…

    rpl committed
    …otSupportedError on desktop-helper touch-events.js)
    
    Gaia user preferences generated by "gaia/build/preferences.js"
    are now located on "gaia/profile-debug/user.js" and needs to be
    copied over "addon/template/profile/user.js" to activate
    custom desktop-helper preferences.
    
    "dom.w3c_touch_events.enabled=1" user_pref fix the exception and
    touch-events.js emulation helper from desktop-helper works again
    (e.g. the FirefoxOS statusbar can be dragged again).
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 0 deletions.
  1. +1 −0 Makefile
View
1 Makefile
@@ -152,6 +152,7 @@ profile:
rm -rf addon/template
mkdir -p addon/template
mv gaia/profile addon/template/
+ cp gaia/profile-debug/user.js addon/template/profile/
cp addon-sdk/app-extension/bootstrap.js addon/template/
cp addon-sdk/app-extension/install.rdf addon/template/
mkdir -p addon/template/profile/extensions
Something went wrong with that request. Please try again.