mirror of
https://github.com/discourse/discourse.git
synced 2025-02-24 21:00:11 +08:00

Meta topic: https://meta.discourse.org/t/mention-suggestion-list-box-in-the-rtl-website-in-wrong-place/266763?u=osama. Our autocomplete box doesn't currently take into account the user's locale and places itself off-screen when using an RTL locale. This commit changes the placement logic for the autocomplete box when an RTL locale is used to make sure that: 1. the autocomplete box's right side is near and to the left of the caret 2. the autocomplete box doesn't go beyond the composer's left side.