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

fix(page): mock selection of multiline text on create/edit link #5241

Merged
merged 2 commits into from
Nov 7, 2023

Conversation

AyushAgrawal-A2
Copy link
Contributor

Closes: #5014

Changes:

  • Mulitple mock selection divs, derived using getClientRects, for representing text selection accurately.
  • Check for isValidUrl in the _onConfirm method before normalizeUrl. Previously, an invalid URL was getting accepted on pressing the Enter key as this check was after normalizeUrl.
scrnli_11_7_2023_3-28-05.PM.mp4

Copy link

vercel bot commented Nov 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blocksuite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 7, 2023 10:03am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
blocksuite-docs ⬜️ Ignored (Inspect) Visit Preview Nov 7, 2023 10:03am

@AyushAgrawal-A2
Copy link
Contributor Author

Hi @doodlewind,
While solving this issue i noticed that while creating a new link, if the selection has some text with different text attributes multiple link elements are created :-

scrnli_11_7_2023_3-46-02.PM.mp4

Shouldn't it be a single link with all text attributes removed ?

@doodlewind
Copy link
Member

@AyushAgrawal-A2 thanks for the finding, removing all attributes here makes sense - new PR welcome :)

@doodlewind doodlewind changed the title fix: mock selection of multiline text on create/edit link fix(page): mock selection of multiline text on create/edit link Nov 7, 2023
@doodlewind doodlewind merged commit d85290a into toeverything:master Nov 7, 2023
21 checks passed
@AyushAgrawal-A2 AyushAgrawal-A2 deleted the ayush/5014 branch November 7, 2023 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Archived in project
Development

Successfully merging this pull request may close these issues.

The visual display is incorrect when trying to create a link in multiple lines
2 participants