steveathon / bootstrap-wysiwyg

Tiny bootstrap-compatible WYSIWYG rich text editor
MIT License
661 stars 1.71k forks source link

Attempt to fix hyperlink issue on Edge/IE #126

Closed hungqcao closed 6 years ago

hungqcao commented 6 years ago

Instead of calling markSelection in focus and clearing browser selection (which will cause issue of losing focus on Edge), we will markSelection at the time users click to the hyperlink button. Also always clearing the highlighted selection when bootstrap dropdown closes or losing focus on hyperlink input.

spreadred commented 6 years ago

I tested in Edge and Internet Explorer. It appears to fix the problem with not being able to use the hyperlink button.

I did notice, however, that it only works properly if you type text first, select that text, and then click the hyperlink button. If you simply click the hyperlink button and type your link, it does not add it to the editor window like it does in Chrome.

Can someone else test and confirm my findings?

spreadred commented 6 years ago

I have pushed @hungqcao changes to my fork with some minor edits of my own. I will create a new issue regarding discrepancies in how Chrome allows creation of a hyperlink straight from the button, without requiring a text selection while other browsers do not..

hungqcao commented 6 years ago

@kaptainkommie I will take a look at the issue about not having previous selection on Edge. I did notice it during testing though.

spreadred commented 6 years ago

@hungqcao I created issue #127 for this, I have provided a bit more information there.