Desktop: Fixes #9950: Link created by LINKIFY in WYSIWYG editor is not underlined until switch to another note #10202
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes : #9950
The current behavior is such that when adding a link to a note using the WYSIWYG editor, the link is not immediately underlined. However, if you switch to another note and then return to the note created earlier, the link is underlined as expected. The expected behavior is that links should be underlined immediately upon insertion, without the need to leave and return to the note.
I found that the problem was that when I pasted the link it was considered as plainText, so I created a function that checks if the pasted text is a link and added this check to the markdowntags if.
Here is the video without the bug fixed:
Screencast.from.26-03-2024.22.12.17.webm
Here is the video after solving the bug:
Screencast.from.26-03-2024.22.10.57.webm