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

IE8 can't fire native events on window #115

Open
davidmh opened this issue Oct 21, 2014 · 0 comments
Open

IE8 can't fire native events on window #115

davidmh opened this issue Oct 21, 2014 · 0 comments

Comments

@davidmh
Copy link

davidmh commented Oct 21, 2014

I saw the same bug reported here: #32 but the fix only solves custom events.

I'm trying to do something like this:

bean.on(window, 'resize', function () { /* something */ });
// ...
bean.fire(window, 'resize');

It works great on all browsers except for IE8 (and below I guess), it throws the error: Object doesn't support this property or method, because it tries to use fireEvent from window.

Here's a testing URL: https://dl.dropboxusercontent.com/u/12380956/ie8bug/index.html

For the time being I found a workaround by using a namespace.

bean.on(window, 'resize custom.resize', function () { /* something */ });
// ...
bean.fire(window, 'custom.resize');

Plus it prevents possible issues by firing third party code binded on those events, like described on this post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant