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

Text formatting stops working correctly if selection ends outside of document [Chrome] #1645

Closed
mitjaz opened this issue Aug 15, 2017 · 6 comments

Comments

@mitjaz
Copy link

mitjaz commented Aug 15, 2017

It's not possible to apply formatting if user is selecting text and releases mouse outside of the document where quill was instantiated, or outside of the browser window. Quill events don't seem to be fired anymore after such action.

Steps for Reproduction

  1. Visit quilljs.com and open any of the playground cases
  2. Start selecting text - hold down mouse
  3. Release mouse outside of the browser window or outside of the document where instance was created
  4. Select some text and try to format it

Expected behaviour:
Formatting text should works as intended

Actual behaviour:
Not possible to format selection with buttons, keyboard formatting works correctly

Platforms:
Chrome 60.0.3112.90
OSX 10.12.5 & Windows 10

Version:
1.3.1

@mitjaz mitjaz changed the title Quill dies if selection ends outside of document [Chrome OSX] Quill dies if selection ends outside of document [Chrome] Aug 15, 2017
@benbro
Copy link
Contributor

benbro commented Aug 15, 2017

What do you mean by "Quill stops responding"?

In my test the selected text isn't getting attributes if releasing the mouse outside the browser window:

  1. Visit https://quilljs.com/ or https://quilljs.com/playground/
  2. Type the word "test" in the editor.
  3. Select the word "test" and release the mouse outside the browser window.
  4. Click on the Bold button.

Expected behaviour:
The text should be bold.

Actual behaviour:
The text isn't bold. Selecting the text again and trying to apply attributes has no effect.
New text behave as usual.

Platforms:
Chrome 60.0.3112.90 on Windows 7.

Version:
1.3.1

@mitjaz
Copy link
Author

mitjaz commented Aug 15, 2017

Sorry for the confusion with the description, I've tried to update it a little bit. I experienced the same kind of problems you have, but also none of the quill events seem to fire any more. On the examples with floating toolbar, the toolbar doesn't appear anymore after selecting text.

What may be of help is that formatting with keyboard shortcuts works as expected.

@mitjaz mitjaz changed the title Quill dies if selection ends outside of document [Chrome] Text formatting stops working correctly if selection ends outside of document [Chrome] Aug 15, 2017
@thinksaydo
Copy link

I can confirm this also happens in Safari.

@thinksaydo
Copy link

I can also confirm that reverting to 1.3.0 fixes this problem. So something in 1.3.1 changed.

@thinksaydo
Copy link

It appears it may have something to do with this commit: d30e36d

@jhchen
Copy link
Member

jhchen commented Aug 28, 2017

Think this is similar to #1654 and also fixed by 57d26fc

@jhchen jhchen closed this as completed Aug 28, 2017
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

4 participants