Drag select & cursor at the end of link not working properly on MS Edge / IE11


#1

I can’t seem to drag-select text from the end of a link mark. This doesn’t happen with different marks, only happening for link specifically. I see that there’s an empty span & br attached to the end, perhaps that’s causing the issue, as I don’t see that behavior with other marks. This behavior happens both on Edge & IE 11.

I can’t also seem to use keyboard to move into the link (from right to left). This only happens on IE 11.

Gifs included:

MS Edge:

pm_edge_bug_edge

IE 11:

pm_edge_bug_ie


#2

I suspect this is related to the wrapper node ProseMirror creates around the cursor when it is on a mark boundary—this involves moving the DOM selection, which I guess aborts drag-select on IE.

Could you see if this patch helps with the issue?


#3

Thanks for the quick response & patch! I upgraded prosemirror-view to 1.3.0.

I do see that the issue is fixed if the cursor was somewhere else at mousedown for drag select. But I still see the issue persisting if you had your cursor at the end of a link either by using keyboard keys or at random times, by clicking there (span & br show up sporadically when you click at the end of the link). It seems like whenever there’s an empty span after <a>, this behavior happens.

The IE 11 issue with using keyboard to move cursor into the link from its right end is still existent as well.

Attached a gif to illustrate the sporadic span showing up & causing drag select to not start. This is in Edge.

pm_edge_bug_edge2