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

Microsoft Edge Support #258

Closed
JNazarukPragmaticWorks opened this issue Jun 27, 2016 · 12 comments
Closed

Microsoft Edge Support #258

JNazarukPragmaticWorks opened this issue Jun 27, 2016 · 12 comments
Labels
Milestone

Comments

@JNazarukPragmaticWorks
Copy link

I'm in the process of selecting a WYSIWYG editor within my company's product and I noticed that your demo site and presumably ContentTools itself doesn't support Microsoft Edge. Once the page has loaded, the pencil icon appears and then I click it, an animated gear icon perpetually stays there and nothing else appears or happens. I loaded the same page in Chrome 51 & IE 11 & Firefox 47.0 and it worked fine. If I'm wrong please feel free to slap this issue down.

@anthonyjb anthonyjb added the bug label Jun 27, 2016
@anthonyjb
Copy link
Member

@JNazarukPragmaticWorks thanks for reporting this - it seems to be working of the developer tools are open so I'm wondering if I left a console.log in some where and that's causing it to fall over :/

Will take a look now.

@JNazarukPragmaticWorks
Copy link
Author

@anthonyjb Thanks for the super fast response!

@anthonyjb
Copy link
Member

Little more information - this happens only on the latest version of Edge, all other version of IE from 10+ are fine including the last version of Edge. The issue does not occur if you have the developer tools open.

@anthonyjb
Copy link
Member

Hi @JNazarukPragmaticWorks - is there any chance you can try this again please. I'm using BrowserStack to test, which is great but the caching can be even more difficult to eliminate on there, especially when the issue doesn't occur if the console is open.

(I work on Ubuntu and don't have a machine I can access to run IE Edge on until tomorrow)

@JNazarukPragmaticWorks
Copy link
Author

@anthonyjb Just tested this again (refreshed several times) and I still receive the same issue on the demo site.

@anthonyjb
Copy link
Member

@JNazarukPragmaticWorks I'll have to wait until I have access to Edge tomorrow, I've traced the issue down to the HTMLParser and and issue with the selfClosing method not existing against a Tag instance. Since the issue happens randomly for me and not at all when the developer tools are open, (not to mention I can't generate an error message in the console (I have to catch alert it) so no traceback) - it's proving difficult to track down.

@JNazarukPragmaticWorks
Copy link
Author

@anthonyjb No worries, let me know if there's something you need and thank you for your time.

@anthonyjb
Copy link
Member

OK I've pushed a fix up to the demo website and had another user confirm that it works on there Edge as well as tested it on BrowserStack. If it works for you I'll apply the patch the the master and push it out.

Thanks for your help with this 👍

@JNazarukPragmaticWorks
Copy link
Author

@anthonyjb I've tested this in Edge on my laptop as well as my tablet and it's working great! Thank you for the fast fix and awesome response.

@anthonyjb
Copy link
Member

@JNazarukPragmaticWorks thank you for confirming.

For those interested here is the problem code and the patch I will be applying:

Character.prototype.addTags = function() {
      var tag, tags, _i, _len, _results;
      tags = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
      _results = [];
      for (_i = 0, _len = tags.length; _i < _len; _i++) {
        tag = tags[_i];

        // HACK: IE Edge sometimes sends an array containing an empty array to this method.
        if (Array.isArray(tag)) {
            continue;
        }

        if (tag.selfClosing()) {
          if (!this.isTag()) {
            this._tags.unshift(tag.copy());
          }
          continue;
        }
        _results.push(this._tags.push(tag.copy()));
      }
      return _results;
    };

I'm concerned about applying this patch because truth be told I don't understand why it is necessary. The issue is limited to the latest version of IE Edge and is difficult to consistently produce because:

  • The error does not occur if the developer tools console is open.
  • The error occurs the majority of the time but it's possible on consistent refreshes that the error will not occur.
  • The error will trigger when parsing a random string of HTML, e.g the element it was parsing content for and erred on the last time will pass fine the next time around and a different string of HTML will trigger the error.

@bfintal
Copy link
Contributor

bfintal commented Jul 7, 2016

Just tested this, the patch worked for us during tests.

@mallikarjuna909
Copy link

In IE11, When we add Hyperlink then if we hit on enter it is removing the text. Please check this.

Thanks.

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