-
Notifications
You must be signed in to change notification settings - Fork 11
T/37: The mention UI should prefer position below the caret. #52
Conversation
# Conflicts: # tests/mentionui.js
TBH, this looks like a bug to me: I agree that we should prefer the positions below the caret, but if that means the panel will stick out of the editor even though there is enough space to accommodate it inside it, it's a bad practice IMO. We don't know what's below the editor, it could be some form or other application UI that matters to the user. Or the editor could be in a modal, and since we're using a floating panel stored directly in The rule of thumb should be that the editor keeps its elements within the editable whenever possible because this is the only space we can safely use. The rest is a gamble for us because it depends on the integration. So I'm for changing the order of prefered panel positions but restoring the limiter back to editable to stay on the safe side. Even though, in some cases, it will look like this it is still better IMO than the other way around because it's not CKEditor territory we'd use. cc @Reinmar |
Restoring @oleq as reviewier as I didn't noticed that changes requested in a previous comment are not applied yet. |
Just to throw 2 cents here, I'd second to that it makes more sense to put dropdown inside of editor region whenever possible. |
@oleq's arguments make a lot of sense. I still have some doubts, but I retract my vote (including my ticket). |
So I'll cleanup this PR so only "prefer south" position will be preserved. |
@oleq OK I've revamped the PR and made sure that mention balloon would prerfer south positions. |
Suggested merge commit message (convention)
Fix: The mention UI should prefer position below the caret. Closes ckeditor/ckeditor5#4643.
Additional information
The only change that was preserved is the order of position returned by
getBalloonPositionData()
I've added some padding text to the manual test to overcome short body problem.It does look OK now in the docs: