Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] web_responsive: Chrome slow scroll #742

Merged
merged 1 commit into from
Oct 16, 2017

Conversation

lasley
Copy link
Contributor

@lasley lasley commented Oct 7, 2017

Test fix. Do not merge until I give the go-ahead please.

#741

cubiq/iscroll#1100

@mgielissen
Copy link

Scrolling works now with Android/Chrome

@lasley lasley changed the title Fix Chrome slow scroll [FIX] web_responsive: Chrome slow scroll Oct 7, 2017
@lasley lasley force-pushed the bugfix/10.0/gh-741-chrome_slow_scroll branch from a23fac8 to 52282f7 Compare October 7, 2017 19:31
@lasley
Copy link
Contributor Author

lasley commented Oct 7, 2017

Alright I've applied the same fix without editing the iScroll library, and added a note to the readme to remove the patch once iScroll is updated (this is fixed upstream, but there isn't a new release yet)

@MosabWadea
Copy link

MosabWadea commented Oct 8, 2017

So I tried this fix but I faced this error, whenever I open the app drawer and close it in the web version:
Uncaught TypeError: Cannot read property 'options' of undefined

https://portal.hobbydistrict.com/web/content/3480-c08c6da/web.assets_backend.js:3427
Traceback:
TypeError: Cannot read property 'options' of undefined
    at HTMLBodyElement.setIScrollProbes (https://portal.hobbydistrict.com/web/content/3480-c08c6da/web.assets_backend.js:3427:2011)
    at HTMLBodyElement.dispatch (https://portal.hobbydistrict.com/web/content/2593-8fb4b90/web.assets_common.js:637:451)
    at HTMLBodyElement.elemData.handle (https://portal.hobbydistrict.com/web/content/2593-8fb4b90/web.assets_common.js:610:173)
    at Object.trigger (https://portal.hobbydistrict.com/web/content/2593-8fb4b90/web.assets_common.js:631:211)
    at HTMLBodyElement.<anonymous> (https://portal.hobbydistrict.com/web/content/2593-8fb4b90/web.assets_common.js:682:147)
    at Function.each (https://portal.hobbydistrict.com/web/content/2593-8fb4b90/web.assets_common.js:370:767)
    at jQuery.fn.init.each (https://portal.hobbydistrict.com/web/content/2593-8fb4b90/web.assets_common.js:358:643)
    at jQuery.fn.init.trigger (https://portal.hobbydistrict.com/web/content/2593-8fb4b90/web.assets_common.js:682:118)
    at HTMLBodyElement.triggerOpenedListeners (https://portal.hobbydistrict.com/web/content/3480-c08c6da/web.assets_backend.js:3424:162)
    at HTMLBodyElement.invokeCallbackOnAnimationEnd (https://portal.hobbydistrict.com/web/content/3480-c08c6da/web.assets_backend.js:3424:889)

I don't think it is from this fix but maybe I did something wrong or inundated library?

P.S. and the fix didn't work on my phone!

@pedrobaeza
Copy link
Member

I receive this error when clicking on the icon for showing the drawer, and the clicking outside the drawer (on Firefox on my PC):

TypeError: this.iscroll is undefined

http://3306323-742-52282f.runbot3.odoo-community.org/web/content/440-5cf7aed/web.assets_backend.js:3479
Traceback:
setIScrollProbes@http://3306323-742-52282f.runbot3.odoo-community.org/web/content/440-5cf7aed/web.assets_backend.js:3479:1998
dispatch@http://3306323-742-52282f.runbot3.odoo-community.org/web/content/428-7a03819/web.assets_common.js:637:378
add/elemData.handle@http://3306323-742-52282f.runbot3.odoo-community.org/web/content/428-7a03819/web.assets_common.js:610:151
trigger@http://3306323-742-52282f.runbot3.odoo-community.org/web/content/428-7a03819/web.assets_common.js:631:204
trigger/<@http://3306323-742-52282f.runbot3.odoo-community.org/web/content/428-7a03819/web.assets_common.js:682:134
each@http://3306323-742-52282f.runbot3.odoo-community.org/web/content/428-7a03819/web.assets_common.js:370:758
each@http://3306323-742-52282f.runbot3.odoo-community.org/web/content/428-7a03819/web.assets_common.js:358:636
trigger@http://3306323-742-52282f.runbot3.odoo-community.org/web/content/428-7a03819/web.assets_common.js:682:113
triggerOpenedListeners@http://3306323-742-52282f.runbot3.odoo-community.org/web/content/440-5cf7aed/web.assets_backend.js:3476:156
invokeCallbackOnAnimationEnd@http://3306323-742-52282f.runbot3.odoo-community.org/web/content/440-5cf7aed/web.assets_backend.js:3476:880
dispatch@http://3306323-742-52282f.runbot3.odoo-community.org/web/content/428-7a03819/web.assets_common.js:637:378
add/elemData.handle@http://3306323-742-52282f.runbot3.odoo-community.org/web/content/428-7a03819/web.assets_common.js:610:151

@lasley
Copy link
Contributor Author

lasley commented Oct 12, 2017

a8f19a8 should fix the issue - my bad I forgot casing

@pedrobaeza
Copy link
Member

I have tested and now there's no error and scroll in PCs works correctly, but trying on my Android mobile with Chrome, I still need to make funny moves for scrolling: there's no possibility to tap and hold the finger for scrolling. Can you please check it?

@lasley
Copy link
Contributor Author

lasley commented Oct 13, 2017

I stole my girlfriend's Android for the day - should be able to fix this now

@lasley
Copy link
Contributor Author

lasley commented Oct 14, 2017

Alright this last change was working pretty solid for me yesterday and looks good on Runbot now. Someone want to confirm?

Fix was to upgrade iScroll to the bleeding edge revision, which contains the proper change. It was created 10 months ago and there have been no changes, so I figure it's got to be stable enough.

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried and working. There's still a strange effect on the header bar with the logo and the "< Apps" link, but I think it's not related with this issue.

@lasley
Copy link
Contributor Author

lasley commented Oct 14, 2017

There's still a strange effect on the header bar with the logo and the "< Apps" link, but I think it's not related with this issue.

Is it this?

image

@pedrobaeza
Copy link
Member

Yeah, definitively

@lasley
Copy link
Contributor Author

lasley commented Oct 14, 2017

I can't replicate the header issue with the last commit

// 2 == always executes the scroll event except during momentum and bounce.
this.iScroll.options.probeType = 2;
// 1 == The scroll event is fired only when the scroller is not busy doing its stuff.
this.iScroll.options.probeType = 1;
Copy link
Contributor Author

@lasley lasley Oct 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was actually the fix to the header issue - the transform thing above I realized marginTop was more clear & basically the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm maybe the marginTop isn't the same, I'm reverting that.

@pedrobaeza
Copy link
Member

Now it's working worst IMO

@lasley
Copy link
Contributor Author

lasley commented Oct 16, 2017

Damn ok I removed the commits from after you mentioned the other header issue & created #756

@pedrobaeza
Copy link
Member

OK, merging this then. @angelmoya please take this for v11

@pedrobaeza
Copy link
Member

Should I squash?

* Update to iScoll bleeding edge to fix OCA#741
@lasley lasley force-pushed the bugfix/10.0/gh-741-chrome_slow_scroll branch from bbc7c1d to f52d2ab Compare October 16, 2017 15:08
@lasley
Copy link
Contributor Author

lasley commented Oct 16, 2017

Should I squash?

I went ahead and did it so my GPG is preserved. I'd say we're good for a merge on CI 🍏

@lasley lasley merged commit d98d9e4 into OCA:10.0 Oct 16, 2017
@lasley lasley deleted the bugfix/10.0/gh-741-chrome_slow_scroll branch October 16, 2017 15:51
pedrobaeza added a commit that referenced this pull request Oct 17, 2017
[9.0][FIX] web_responsive: Chrome Slow Scrolling
pedrobaeza added a commit that referenced this pull request Oct 17, 2017
[11.0][FIX] web_responsive: Chrome Slow Scrolling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants