Created attachment 345437 [details]
Open the attached HTML file in the MiniBrowser with the editor mode on:
$ /usr/libexec/webkit2gtk-4.0/MiniBrowser --editor-mode a.html
Then use arrows to move the cursor within the text, specifically:
I) holding the Arrow-Down stops at the start of the anchor of the second paragraph and doesn't move further.
II) when have cursor at the place of I), press Arrow-Right 5 times; then:
II-a) press Home key, the cursor moves at the beginning of the anchor; press the Home the second time, then it moves to the line beginning;
II-b) press Arrow-Up, the cursor moves to the right, not up; pressing Arrow-Up again doesn't move the cursor, but pressing Arrow-Left three times and then Arrow-Up moves cursor to the right again, to a different position.
The anchors is styled as:
which obviously confuses WebKitGTK+. The idea is to not wrap anchors, even they are inside a div styled as:
I didn't find any better trick to stop wrapping of the anchors. I didn't feel to split the DOM structure, because it can be a deep tree of elements.
If you have any better suggestion for a workaround of this WebKitGTK+ bug, then I'll be happy to change the code for the time being. Downstream bug: