cubiq / iscroll

Smooth scrolling for the web
http://iscrolljs.com
MIT License
12.87k stars 3.8k forks source link

iScroll doesn't work with svg tags on Chrome ver. 50 #1033

Open maciek-m opened 8 years ago

maciek-m commented 8 years ago

iScroll stopped working with svg tags after upgrading desktop Chrome to version 50.

The SVGElement.offset* methods have been removed from all elements except HTMLElement to improve spec compliance.

http://blog.chromium.org/2016/03/chrome-50-beta-push-notification.html

ghost commented 8 years ago

This is bad.

kaansoral commented 8 years ago

really?

hope there will be a simple-to-apply hotfix

sculove commented 8 years ago

ref. https://www.chromestatus.com/features/5724912467574784 https://developers.google.com/web/updates/2016/03/chrome-50-deprecations#remove-support-for-svgelementoffset-properties

luky1984 commented 8 years ago

I met this problem too. Before it will be fixed (somehow) i guess the temporary solution is to wrap the SVG element in DIV and set same dimensions of this DIV as the ones of SVG (and that div is in its wrapper on which is applied iscroll)

sculove commented 8 years ago

need to change utils.offset method.

maciek-m commented 8 years ago

Workaround suggested by @luky1984 worked for me - many thanks!