erictsangx / fire-drag

Firefox add-on: provide drag-and-drop utilities for texts and links
32 stars 14 forks source link

Plaintext URLs starting with whitespace are not recognized #7

Closed monk-time closed 7 years ago

monk-time commented 7 years ago

Dragging plaintext URLs works only if selection starts on the first character of the URL, but not if any whitespace is accidentally included before it, which is very trivial to do if the URL is on a separate line and selection grabs \n.

I think the easiest way around would be to include a single .trim() into the dragend event listener.

edit: #4 is a less specific duplicate of this issue. Or vice versa 😒

erictsangx commented 7 years ago

Fixed on v1.0.3