(1) To add more detailed screenshots:
- the handle of the link inspector correctly displayed:
- a cursor is moved to the beginning of the word:
(2) (unrelated to the reported issue and not specific to Flow pages) There are cases when the entire link inspector gets misplaced (or de-attached). When links are entered continuously or when link were entered via source editing with forced new lines, or copy/paste links separated with newlines.
If I had to guess, I would guess that somewhere, a $container config option for this PopupWidget is set so that it is not allowed to extend past the boundaries of the edit field (or it is not set and the autodetected value is wrong).
This is ve.ui.DesktopContext#popup, I think.
Setting a breakpoint in OO.ui.PopupWidget.prototype.computePosition and doing this.$container = $( '#content' ); resolves the problem, so I guessed right. But that leaves two problems:
- We'd need to set a different container for every skin, or just set it to use OO.ui.Element.static.getRootScrollableElement, but that will cause the popups to appear over the sidebar, which might be undesirable.
- We'd need to somehow pass that from mw.flow.ve.Target (I think) to ve.ui.DesktopContext.