popline icon indicating copy to clipboard operation
popline copied to clipboard

Link selection does not always work in Firefox

Open ChristinePHP opened this issue 4 years ago • 0 comments

Scenario:

  1. Text is selected and then linked via the link button.
  2. Selecting the text thereafter does not always show the unlink button, instead it shows the link button. This is intermittent, at times it works and at other times it doesn't work even though only the text that is linked is selected. Selecting portions of the linked text and not the entire linked text seems to always show the unlink button.

In checking the code I see there is a different function that is called when Firefox is being used (ie. firefoxSelectionIsLink()).

I am using the latest version of Firefox at the time of writing - 82.0

I found a link on Stack Overflow (https://stackoverflow.com/questions/47232304/check-if-selection-contains-link) that deals with this and have replaced the existing function with the answer from "user670839". This seems to be working.

ChristinePHP avatar Oct 22 '20 13:10 ChristinePHP