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

From 0.8.18 to latest(commit 1521019), Some issues in IE9 compatible browser #4624

Open
6 tasks done
gnh1201 opened this issue Mar 20, 2024 · 4 comments
Open
6 tasks done

Comments

@gnh1201
Copy link

gnh1201 commented Mar 20, 2024

Checklist

  • I've looked at the documentation to make sure the behavior isn't documented and expected.
  • I'm sure this is an issue with Summernote, not with my app or other dependencies (Angular, Cordova, React, etc.).
  • I've searched through the current issues to make sure this hasn't been reported yet.
  • My issue is pertinent to this repository of Summernote (jQuery), or I was unable to have my issue resolved from the relevant version I'm using, such as Angular, dJango, Rails or React. Please try your issue at the relevent repository first.
  • I understand that issues without interaction for more than 14 days (2 weeks), may be closed at our discretion. We do this, as sometimes issues are abandoned. We may at our discretion, add issues to the relevant project to be looked at, or for maintainers to work through as time permits. This is to help keep issues relevant to the current version of Summernote, and to reduce clutter.
  • I agree to follow the Code of Conduct that this project adheres to.

Steps to reproduce

No response

Expected behavior

  1. When applying styles such as bold, underline, and italic in IE9 (IE9 compatible browser) there should be no errors. (Based on summernote version 0.8.18)
  2. When rendering the summernote editor in IE9 (IE9 compatible browser), $popover (or this.$popover) should not be null. (Based on summernote commit 1521019.)

Current behavior

  1. In IE9 (IE9 compatible browser), an error occurs at line 5859 of summernote-lite.js.
document.execCommand('styleWithCSS', false, this.options.styleWithCSS);

It seems that the browser does not allow the styleWithCSS command, even though the document.execCommand function is enabled. Handling this as an exception allows the function to work properly.

Since there have been no changes in the recent commit (commit 1521019), it is expected to continue affecting as it is.

This is based on summernote version 0.8.18.

  1. In IE9 (IE9 compatible browser), the value of $popover (or this.$popover) is null. This leads to errors when methods related to $popover (or this.$popover) are called, such as this.$popover.hide().

This is based on summernote commit 1521019. To ensure compatibility, the following settings were added to the output section in config/webpack.production.js:

    environment: {
      const: false,
      arrowFunction: false,
    },

Minimal example reproducing the issue

No response

Environment

  • Summernote version: From 0.8.18 to latest(commit 1521019)
  • Browser (with version): IE9 (IE9 compatible browser)
    • User Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; Tablet PC 2.0; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
  • OS/Platform (with version): Windows 11 22H2
@DennisSuitters
Copy link
Member

You're welcome to do a PR to rectify the issue, however, I would be checking if it's worth continuing to support IE9.

@gnh1201
Copy link
Author

gnh1201 commented Mar 20, 2024

While IE9 for general users is no longer in use, another browser, not commonly referred to as IE but compatible with IE9 specifications, remains popular in industrial applications. Therefore, if addressing this issue doesn't require significant effort, I believe it's still worthwhile.

@DennisSuitters
Copy link
Member

Feel free to submit a PR.

@gnh1201
Copy link
Author

gnh1201 commented Mar 20, 2024

I have resolved this issue. I will submit the PR soon.

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