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

regionfragmentchange event is not hooked in IE10+ #38

Open
itryapitsin opened this issue Oct 10, 2016 · 5 comments
Open

regionfragmentchange event is not hooked in IE10+ #38

itryapitsin opened this issue Oct 10, 2016 · 5 comments

Comments

@itryapitsin
Copy link

itryapitsin commented Oct 10, 2016

I have the next code

this.namedFlow.addEventListener('regionfragmentchange', function () {...});

regionfragmentchange is hooked in Chrome, Opera, Yandex & Firefox, but doesn't work in IE10 & IE11

@itryapitsin itryapitsin changed the title regionfragmentchange event is not fired in IE10+ regionfragmentchange event is not hooked in IE10+ Oct 10, 2016
@FremyCompany
Copy link
Owner

Okay if that also apply to IE11 I'll take a look at it. Please provide a reduced test case I can run in both browsers to find out the difference ;-)

@itryapitsin
Copy link
Author

itryapitsin commented Oct 18, 2016

it is reproduced in IE 11. As I can understand there are no call ondone method. This method is defined since 4996 line in https://github.com/FremyCompany/css-regions-polyfill/blob/master/bin/css-regions-polyfill.js file

I have attached small example with code for you. I hope it help.
bookjs-polyfill-master 2.zip

@FremyCompany
Copy link
Owner

I will have a look tomorrow

@FremyCompany
Copy link
Owner

From what I can see the problem is in your code. In IE, there are no element matching a rule creating a region at all. For some reason <div class="pagination-body-0-layout pagination-chapter"> never gets created at all. I don't understand how that could be related to the events generated by the polyfill, but maybe you can explain this to me.

@FremyCompany
Copy link
Owner

Could this be a race condition? IE uses additional polyfills to work, maybe something fires too early or too late and messes up with your flow but I don't really understand why.

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

2 participants