This repository has been archived by the owner. It is now read-only.

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

Merged
merged 1 commit into from Oct 21, 2013

Conversation

Projects
None yet
2 participants
@rpl
Member

rpl commented Oct 21, 2013

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

This comment has been minimized.

Show comment
Hide comment
@ochameau

ochameau Oct 21, 2013

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

Member

ochameau commented Oct 21, 2013

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

This comment has been minimized.

Show comment
Hide comment
@rpl

rpl Oct 21, 2013

Member

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

Member

rpl commented Oct 21, 2013

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

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).
@rpl

This comment has been minimized.

Show comment
Hide comment
@rpl

rpl Oct 21, 2013

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)

Member

rpl commented Oct 21, 2013

@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

This comment has been minimized.

Show comment
Hide comment
@ochameau

ochameau Oct 21, 2013

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

Member

ochameau commented Oct 21, 2013

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 added a commit that referenced this pull request Oct 21, 2013

Merge pull request #852 from rpl/fix/touchevents-not-supported-error
Bug 926540 - copy gaia/profile-debug/user.js to addon/template/profile r=@ochameau

@ochameau ochameau merged commit c07aae1 into mozilla:master Oct 21, 2013

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.