Hello Friends,
When we tag somebody in our website a Horizontal scroll bar is showing for some reason and you can see the picture below:
AI-generated summary
In a UX-related discussion titled “Horizontal scroll bar showing when tagging somebody,” Jay91 reported that tagging users on their RTL (Arabic) website triggers an unwanted horizontal scrollbar, accompanied by a screenshot. simon confirmed the issue occurs specifically in RTL locales and traced it to caret_position.js, which positions a hidden div with left: -7000px — incorrect for RTL. He proposed switching to right: -7000px for RTL or better, adding an id to the div and managing positioning via CSS, which automatically adapts in RTL themes simon. Jay91 asked where to edit the file, but simon advised against manual edits, noting it must be fixed in Discourse core and isn’t CSS-targetable. Jay91 also noted tagging forces mobile users into desktop view, worsening usability. After noting no fix in recent updates Jay91, simon apologized for the delay and confirmed a fix was imminent. Jay91 graciously acknowledged the team’s efforts. Finally, Jay91 confirmed the issue was resolved in the latest update, expressing gratitude with celebratory emojis.
I can reproduce this when using a right-to-left locale.
correct, we use RTL website in other word we use it in arabic.
any solution for this ?
The problem is with the div that’s created by caret_position.js. It’s position is set to left: -7000px. Switching it to right: -7000px for RTL locales solves the problem. I haven’t worked through all the details of what it’s doing.
Thanks a lot, but how i can do that? where is the the file i have to edit caret_position.js ??
No, don’t do that. It will have to be fixed in the Discourse code. It doesn’t look like it can be targeted with custom css.
Ok, sounds well, so this maybe will be fixed in next update ?
because also tagging somebody is moving the users from mobile view to desktop view automatically on small screen mobile phones which making tagging somebody very difficult for the user.
Thanks.
An easy fix for this is to add an id to the clone div, and then set its left/right position with css instead of with javascript.
clone = $("<div id='caret-clone'><p></p></div>").appendTo("body");
#caret-clone {
left: -7000px; // left will be automatically converted to right in the rtl stylesheet
}
how i can do that, where i have to go ?
We received 4 updates in last 40 days but nothing happened, the same problem is occurring !!
Any suggestions ?
Sorry for the delay on this. It will get fixed right away.
That is fine, don`t be sorry, i just tried to remind you guys… Thanks in advance, i know you guys working hard to make this awesome software better for us.
We tested the tagging today with last update and we found that the problem has been fixed. ![]()
![]()
![]()