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

Enhance URL Replacement Functionality to Update Display Text When Pasted Over a Link #347

Open
makhnatkin opened this issue Aug 27, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@makhnatkin
Copy link
Collaborator

Description

There is an unexpected behavior when trying to replace a link whose display text matches the URL. Currently, if a user pastes a new URL into a link where the display text is identical to the original URL, only the URL is updated while the display text remains unchanged. This causes confusion and seems counterintuitive to the expected behavior.

Steps to Reproduce

  1. Create a link where the display text is equal to the URL (e.g., display text and URL both are "http://example.com").
  2. Highlight the link.
  3. Paste a different URL using Ctrl + V (e.g., "http://newlink.com").

Expected Behavior

The display text should be updated to the new URL (e.g., display text becomes "http://newlink.com").

Actual Behavior

The display text remains as the old URL (e.g., display text stays "http://example.com"), while the URL changes to the new one.

Proposal

Implement a check that updates the display text to match the pasted URL if the original display text was the same as the original URL. This will align user expectations with the behavior of the editor.

@makhnatkin makhnatkin added the good first issue Good for newcomers label Sep 9, 2024
@makhnatkin makhnatkin added enhancement New feature or request and removed good first issue Good for newcomers labels Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant