Skip to content
This repository has been archived by the owner on Jan 20, 2021. It is now read-only.

Resize error in IE8 #24

Closed
kachkaev opened this issue Nov 4, 2015 · 1 comment
Closed

Resize error in IE8 #24

kachkaev opened this issue Nov 4, 2015 · 1 comment

Comments

@kachkaev
Copy link

kachkaev commented Nov 4, 2015

I'm not sure how much you will be willing to fix this, but here is an issue that I've just spotted in IE8 and IE7 (yes, someone still tests in this browser in 2015). The following chunk of code causes an exception:

$(w).on('resize.sticky', function(){
    raf( that.rePosition.bind(that) )  // Object does not support this property or method
});

The reason is that bind was introduced only in IE9 is therefore not a function in earlier versions. How about replacing this with something more robust?

I disabled stickyfloat in IE8 and IE7 for now – it’s use is not that crucial in my project. But I might be still not the only person to develop for old good g̶o̶o̶d̶ IEs.

One more thing, it's more about the performance. Would not it be reasonable to throttle calls to the resize handler? One little window move causes a whole lot of exceptions in IE8 and this suggests that reducing the number of calls, say to max 1 in 50 ms, will be useful in modern browsers.

@kachkaev
Copy link
Author

kachkaev commented Nov 4, 2015

UPD: I managed to fix the problem using this workaround, so no need in switching the plugin off in IE7&8:
http://stackoverflow.com/a/11054570/1818285

@yairEO yairEO closed this as completed in 220c5d1 Sep 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant