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

Cannot copy/paste links #114

Closed
dselman opened this issue Jun 16, 2020 · 5 comments · Fixed by #216
Closed

Cannot copy/paste links #114

dselman opened this issue Jun 16, 2020 · 5 comments · Fixed by #216
Labels
A11Y 🔓 Accessibility related Difficulty: Medium Good First Issue :octocat: Good for newcomers hacktoberfest-accepted DigitalOcean's Hacktoberfest 2020 Package: Markdown Editor ⌨️ Type: Bug 🐛 Something isn't working

Comments

@dselman
Copy link
Contributor

dselman commented Jun 16, 2020

Cannot select links in the markdown editor (using mouse or keyboard) because the link editor pops-up during selection.

Bug Report 🐛

  1. Open a document containing a link
  2. Attempt to copy/paste the link
  3. The link cannot be selected using either the mouse or keyboard because as soon as the selection enters the link the pop up appears

Expected Behavior

Should be able to select a link.

Current Behavior

Over-eager pop-up prevents selection.

Possible Solution

Timer? Click into a link to activate the pop-up? Ensure not in selection mode?

Desktop

  • OS: Mac
  • Browser: Safari
  • Version: 13.1.1
@jolanglinais
Copy link
Member

I see this happening when trying to highlight the link by dragging the curser across it, but note that if you right click to copy it works:

Jun-16-2020 09-16-49

@jolanglinais jolanglinais added A11Y 🔓 Accessibility related Difficulty: Medium Good First Issue :octocat: Good for newcomers labels Jun 16, 2020
@jolanglinais
Copy link
Member

I think we should customize the popup behavior to be if the selection.anchor is the beginning of the link and selection.focus is the end of the link, and no other time?

@DianaLease
Copy link
Member

I think we should customize the popup behavior to be if the selection.anchor is the beginning of the link and selection.focus is the end of the link, and no other time?

I think that is already the case, as I am able to select text that includes more than just the link without it popping up. Only if I select within the link does it pop up. But maybe that's not the exact behavior we want. Maybe we should only popup if the selection is within the link AND collapsed?

@jolanglinais
Copy link
Member

Hmm that may have been what I was trying to describe. I'm still not certain what collapsed means in Slate.

@DianaLease
Copy link
Member

Hmm that may have been what I was trying to describe. I'm still not certain what collapsed means in Slate.

It basically means the selection is a single point, not a range. So if I click inside the link, my selection is collapsed. If I highlight the link or part of the link, my selection is not collapsed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A11Y 🔓 Accessibility related Difficulty: Medium Good First Issue :octocat: Good for newcomers hacktoberfest-accepted DigitalOcean's Hacktoberfest 2020 Package: Markdown Editor ⌨️ Type: Bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants