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

URL disappears in link popup when reopening the popup #211

Open
feuerste opened this issue Feb 14, 2018 · 1 comment
Open

URL disappears in link popup when reopening the popup #211

feuerste opened this issue Feb 14, 2018 · 1 comment

Comments

@feuerste
Copy link

Hello,
I am using the link tool to define URL links. I discovered one pretty annoying bug though. Here is how to reproduce it:

  1. Select a word and click on the link button to open the link popup
  2. Fill in all fields and click on the check-mark button, so the popup closes, but the word stays selected
  3. Click on the link button again -> Now the URL previously filled in vanished

This does not happen, when I move my cursor to another word after step 2, then select the original word again and perform step 3

If I comment https://github.com/miztroh/wysiwyg-e/blob/f7dad165ba5c83520423654e210e004c20f2117d/tools/link.html#L195 and https://github.com/miztroh/wysiwyg-e/blob/f7dad165ba5c83520423654e210e004c20f2117d/tools/link.html#L196, this behavior is fixed. Do you remember, why the linkUrl and linkTarget are reset after closing the dropdown? If there wasn't a special purpose, can you please remove the two lines?

Thanks a lot for your help!
Best regards,
Marco

@miztroh-zz
Copy link
Owner

Issue is confirmed, but clearing the data when the dropdown closes is needed to make sure the old data is gone when you go to edit another link. When a link is in the selection, the data gets repopulated. However, for some reason the browser says a selection with its caret at the beginning of the link doesn't have the link in it but a selection with its caret at the end of the link does. I'm going to try to see if I can reposition the caret to the end of the link after creating it.

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

2 participants