Closed
Bug 827357
Opened 13 years ago
Closed 13 years ago
mozbrowserasyncscroll doesn't work: The event is never received by content
Categories
(Firefox OS Graveyard :: General, defect)
Firefox OS Graveyard
General
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: justin.lebar+bug, Unassigned)
References
Details
I think this is because nsAsyncScrollEventDetail is missing DOMClassInfo.
| Reporter | ||
Comment 1•13 years ago
|
||
> I think this is because nsAsyncScrollEventDetail is missing DOMClassInfo.
Oh, maybe not. Hm.
| Reporter | ||
Comment 2•13 years ago
|
||
Benjamin, how did you test your patch?
Ben Francis and I have not been able to get Gaia to receive one of these events. But I also can't see anything obviously wrong with your code.
To test:
* Apply the following patch to Gaia.
* ./build.sh gaia && ./flash.sh gaia
* Enable console.log dumping: Open settings, device information, more information, developer. Uncheck and then re-check the "console enabled" setting.
* Open the browser app, navigate to a page.
* $ adb logcat
* Scroll around. Notice that you get scroll events, but not async scroll events.
diff --git a/apps/browser/js/browser.js b/apps/browser/js/browser.js
index 24b2a90..e097dd0 100644
--- a/apps/browser/js/browser.js
+++ b/apps/browser/js/browser.js
@@ -418,18 +418,25 @@ var Browser = {
this.handleKilledTab(tab);
} else {
this.handleCrashedTab(tab);
}
}
break;
case 'mozbrowserscroll':
+ console.log('mozbrowserscroll');
+ dump('mozbrowserscroll');
this.handleScroll(evt);
break;
+
+ case 'mozbrowserasyncscroll':
+ console.log('mozbrowserasyncscroll');
+ dump('mozbrowserasyncscroll');
+ break;
}
}).bind(this);
},
handleScroll: function browser_handleScroll(evt) {
if (evt.detail.top < this.LOWER_SCROLL_THRESHOLD) {
if (this.addressBarState === this.VISIBLE ||
this.addressBarState === this.TRANSITIONING) {
| Reporter | ||
Updated•13 years ago
|
Assignee: justin.lebar+bug → nobody
Comment 3•13 years ago
|
||
(In reply to Justin Lebar [:jlebar] from comment #2)
> Benjamin, how did you test your patch?
>
> Ben Francis and I have not been able to get Gaia to receive one of these
> events. But I also can't see anything obviously wrong with your code.
>
> To test:
>
> * Apply the following patch to Gaia.
> * ./build.sh gaia && ./flash.sh gaia
> * Enable console.log dumping: Open settings, device information, more
> information, developer. Uncheck and then re-check the "console enabled"
> setting.
> * Open the browser app, navigate to a page.
> * $ adb logcat
> * Scroll around. Notice that you get scroll events, but not async scroll
> events.
> +
> + case 'mozbrowserasyncscroll':
> + console.log('mozbrowserasyncscroll');
> + dump('mozbrowserasyncscroll');
> + break;
> }
> }).bind(this);
> },
>
I also add 'asyncscroll' at |bindBrowserEvents: function browser_bindBrowserEvents(iframe, tab)| in browser.js.
bindBrowserEvents: function browser_bindBrowserEvents(iframe, tab) {
var browserEvents = ['loadstart', 'loadend', 'locationchange',
'titlechange', 'iconchange', 'contextmenu',
'securitychange', 'openwindow', 'close',
'showmodalprompt', 'error', 'scroll',
- 'usernameandpasswordrequired'];
+ 'usernameandpasswordrequired','asyncscroll'];
| Reporter | ||
Comment 4•13 years ago
|
||
Aha. Thanks a lot!
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•