gblazex/smoothscroll-for-websites

IE support

Closed this issue · 26 comments

In the "First Run" part:

/***********************************************
 * FIRST RUN
 ***********************************************/

var userAgent = window.navigator.userAgent;
var isEdge    = /Edge/.test(userAgent); // thank you MS
var isChrome  = /chrome/i.test(userAgent) && !isEdge; 
var isSafari  = /safari/i.test(userAgent) && !isEdge; 
var isMobile  = /mobile/i.test(userAgent);
var isEnabledForBrowser = (isChrome || isSafari) && !isMobile;

Why is it Chrome/Safari only? IE could use some smoothscrolling love as well, or are there any issues I may not be aware of?

IE has built in smooth scrolling as far as I know
(Meaning one tick of mouse wheel is not just a discrete 100px jump but an animation)

I think you may be able to enable it as a configuration setting, though I am not aware exactly how, but I am on a Windows 7 PC right now and by default IE11 is not animating.

According to this it's On by default since Windows 8
http://stackoverflow.com/questions/29416448/how-to-disable-smooth-scrolling-in-ie11

Couldn't find other references yet. It's been a while since I used 7, so I might have remembered it wrong.

Can you look for more references if it's indeed W 8+ only?

sure, will check n let u know

I use Windows 8.1 with the browser Edge and the SmoothScroll not worked.

will check, thanks

dbdev commented

Hi,

I'm also interested in the issue for Windows 8.1, any help will be appreciated.

Thanks

I'll be able to look into this over the weekend.

It seems to me that Edge is only available for Windows 10.

http://stackoverflow.com/questions/31781292/can-i-download-use-microsoft-edge-in-windows-8-1
https://www.quora.com/Can-I-download-Microsoft-Edge-for-my-Windows-8-1-laptop

Is it what you guys meant? Windows 10 & Edge?

@Giovancruz @dbdev

In case of Edge there's built in smooth scrolling.

@Maximilianos I just checked and Windows 7 doesn't indeed have the kind of smooth scrolling I remembered. It does have something called "smooth scrolling" but it's not really smooth, and the animation is almost nonexistent.

Windows 8 has a totally different kind of smooth scrolling, which was good enough not to be messed with.

I'll think about enabling this project for Win7 + IE 11 specifically.

Not sure about older versions of IE though.

dbdev commented

Just keep me posted guys on the IE issue, it would be nice to get something similar to the Mac version.

@dbdev You should have smooth scrolling in IE 11 under Windows 8.1.

dbdev commented

Hi again,

do you guys have the possibility to check is there is an issue with Windows 8 + Chrome and the scrolling with the mouse wheel?

Thanks a lot for a response

I have W7 and W10 but no 8.

@galambalazs thanks for the effort, let me know if I can help with something

dbdev commented

Does the wheel scroll in Chrome works correctly in those versions?

in Chrome? yes definetely.
My issue was for IE on W7

dbdev commented

Thanks for checking.

Regarding IE 11 i've got an issue, that when the background-Image is fixed, the Image is somehow shaking when Scrolling with the mouse-wheel. Is that a known issue?

Windows 7, 8, 10 ?

Hi.

I have Win7 & IE11 & try to fix:

var isExplorer    = /Trident\/|MSIE /.test(userAgent); // IE
var isEnabledForBrowser = (isChrome || isSafari || isExplorer) && !isMobile;

But if I press key down in IE11 I got error here:

    // our own tracked active element could've been removed from the DOM
    if (!document.contains(activeElement)) {
        activeElement = document.activeElement;
    }

I think will be good if to support and the fuc... IE :) Win7 will live few years yet.

what error?

Like this: skatejs/skatejs#153 = "document.contains doesn't exist"

Right. Seems like easy to fix:

if (!document.body.contains(activeElement)) {
    activeElement = document.activeElement;
}

I'll update the repo with this in the future, but in the meantime you can use this.

see this IE bug: https://connect.microsoft.com/IE/feedback/details/780874/node-contains-is-incorrect

added IE 11 Win 7 support in v1.4.4, also fixed this bug above.

Let me know guys how it works

cc @Maximilianos @artfulcat

All is right. Thx.