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

Unexpected triggering of URLs on blur #65

Closed
ajalexander opened this issue Jan 6, 2022 · 2 comments · Fixed by #73
Closed

Unexpected triggering of URLs on blur #65

ajalexander opened this issue Jan 6, 2022 · 2 comments · Fixed by #73
Labels

Comments

@ajalexander
Copy link

There is some behavior that seems unexpected that triggers on blur.

Unexpected cases

There are two cases that seem off from my expectations:

Removing a link and changing focus

  • Enter the Quill editor
  • Enter text https://www.google.com test
  • Click to move the cursor to be between the o and the m in .com
  • Use the pop-up to remove the link
  • Click out of the editor
  • Expected: All text will be plain text
  • Actual: There is a URL for https://www.google.co with the m from .com left as plain text

Clicking into URL-like text and changing focus

  • Enter the Quill editor
  • Enter text https://www.google.com test
  • Click to move the cursor to be between the o and the m in .com
  • Use the pop-up to remove the link
  • Click to the end of the text
  • Click out of the editor
  • (Note: At this time https://www.google.com test will all be present as plain text)
  • Click to move the cursor to be between the o and the m in .com
  • Use the pop-up to remove the link
  • Click out of the editor
  • Expected: All text will be plain text
  • Actual: There is a URL for https://www.google.co with the m from .com left as plain text
@ajalexander
Copy link
Author

To more narrowly cover the needs of #48 (which prompted #56), I'm wondering when running on blur the URL matching should only occur if the cursor is at the end of the text area or if it is immediately followed by a space.

@visualjerk visualjerk added the bug label Jan 14, 2022
visualjerk added a commit that referenced this issue Apr 9, 2022
* fix(#65): unexpected triggering on blur
* chore: update version
@visualjerk
Copy link
Owner

Thanks for submitting this bug. It should be fixed in the newest release:
https://github.com/visualjerk/quill-magic-url/releases/tag/4.1.4

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

Successfully merging a pull request may close this issue.

2 participants