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

title actions produce error in IE11 #3143

Closed
digital88 opened this issue Jul 29, 2021 · 8 comments
Closed

title actions produce error in IE11 #3143

digital88 opened this issue Jul 29, 2021 · 8 comments
Labels
Milestone

Comments

@digital88
Copy link

digital88 commented Jul 29, 2021

Are you requesting a feature, reporting a bug or asking a question?

Bug

What is the current behavior?

When opening page with survey in Internet Explorer 11, code in file src\knockout\components\action-bar\action-bar.ts (and probably same in src\knockout\components\progress\buttons.ts) in method ko.components.register(...) at line const container: HTMLDivElement = componentInfo.element.nextElementSibling; returns undefined container because IE do not expose nextElementSibling on comment nodes. ResponsivityManager then crashes at line this.resizeObserver.observe(this.container.parentElement);

What is the expected behavior?

Make code return container to pass to ResponsivityManager class

How would you reproduce the current behavior (if this is a bug)?

Go open page in IE 11 https://surveyjs.io/Examples/Library (you also need to polyfill object.assign and ResizeObserver)

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://surveyjs.io/Examples/Library

Test code

your_code_here

Specify your

  • browser: IE 11
  • browser version: 11.0.9600.17498 update version 11.0.15
  • surveyjs platform (angular or react or jquery or knockout or vue): jquery
  • surveyjs version: 1.8.56
@andrewtelnov andrewtelnov changed the title Problem in IE11 title actions produce error in IE11 Jul 29, 2021
@andrewtelnov
Copy link
Member

@digital88 Fixed by the commit above.

Thank you,
Andrew

@andrewtelnov andrewtelnov added this to the v1.8.59 milestone Jul 29, 2021
@digital88
Copy link
Author

@digital88 Fixed by the commit above.

Thank you,
Andrew

Thanks for quick reply, but you also have object.assign in 'src\action-bar.ts'.

Also knokout 3.5.1, which you use as dependency, uses object.assign within its internals.

So as I said it need to be global polyfill.

And maybe I didn't word it correctly, but my bug report was about: const container: HTMLDivElement = componentInfo.element.nextElementSibling; returns undefined because IE does not expose nextElementSibling on comment nodes. So object.assign and ResizeObserver are just side bugs here )

@andrewtelnov
Copy link
Member

@digital88 OK, We will review it more carefully.

Thank you,
Andrew

dmitry-kurmanov added a commit that referenced this issue Jul 29, 2021
@tsv2013 tsv2013 added the fixed label Aug 3, 2021
@tsv2013 tsv2013 closed this as completed Aug 3, 2021
@digital88
Copy link
Author

@tsv2013 Can you please explain why it's closed? If I manually polyfill ResizeObserver in IE this fix will still crash in IE11.

@tsv2013
Copy link
Member

tsv2013 commented Aug 3, 2021

@digital88 We'll check it @dmitrykurmanov Could you clarity the state of the issue? It is marked as related to v1.8.59 just has been released.

@tsv2013
Copy link
Member

tsv2013 commented Aug 4, 2021

We've checked our code and samples. The above mentioned commit 9502ffe actually fixes the console error related to undefined ResponsivityManager.

This responsivity behavior (buttons collapse into popup menu) is related to action items only (buttons) that can be available in question title. And this responsivity is not supported in IE11. Actions in question title will be available in IE11 but they don't support responsive behavior. With the information that IE11 will be officially retired by MS in a year (https://blogs.windows.com/windowsexperience/2021/05/19/the-future-of-internet-explorer-on-windows-10-is-in-microsoft-edge/) I hope you understand us in our strategy not to support new features for deprecated browsers.

Console error is eliminated. That's why we treat this issue as closed.

@digital88
Copy link
Author

Ok, I understand. Thanks for clarification.

@mkopinsky
Copy link
Contributor

mkopinsky commented Aug 26, 2021

I'm still getting a console error in IE 11 from this.

https://plnkr.co/edit/UGB9Rhq2Vp8mYwRF

image

Earlier I was getting a different stack trace from my app (rather than plunkr) which was showing action-bar.ts as part of the stack trace
image

When I view the same survey in a modern browser (chrome 92) I can see that it's rendering an sv-action-bar even though it's empty.
image

Normally I wouldn't care about just a console error in IE 11. But my app is accessed through an unusually-configured embedded IE thing which throws these old school errors. And since each question has an sv-action-bar, the user has to click through this error once for each question in the survey
image

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

No branches or pull requests

4 participants