Page MenuHomePhabricator

Large horizontal scroll bar when editing on Wikidata for RTL interface languages
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

Extremely long horizontal scroll is added to the page as soon as a new statement is added.

What should have happened instead?:

No horizontal scrolling.

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

This has been happening in the last couple of weeks; this did not used to happen.

It happens in the latest stable version of Firefox on Windows desktop and Firefox 105 in Linux.
It does not happen on mobile Chromium (browsing Wikidata in "Desktop mode") or a desktop browser based on Chromium 104.

It happens when editing labels, sitelinks or statements. It does not happen when editing lemmas, forms or senses.

Event Timeline

Changing the labels on items also causes this problem.

@Nikki was able to help identify that this problem is caused by a textarea with inset: -9999px auto -9999px auto set as an HTML style attribute.

Upon adding the following to my user CSS, it now works beautifully again:

textarea {
    inset: auto auto auto auto !important;
}

The textarea also problematically has no id or class, and can be inserted at any position, so overriding for all textarea elements is necessary.

I think this is coming from https://gerrit.wikimedia.org/g/data-values/value-view/+/a8d02b9291ec834cd8c9190d1365200a62734daa/lib/jquery/jquery.inputautoexpand.js which sets "left" regardless of the page direction, instead of checking the page direction and using left/right as appropriate, or using the logical equivalent, "inset-inline-start".

Nikki renamed this task from Adding a statement to entity on Wikidata now causes extremely long horizontal scroll to Large horizontal scroll bar when editing on Wikidata for RTL interface languages.Oct 22 2022, 4:49 PM
Nikki added a project: RTL.
Nikki updated the task description. (Show Details)
Lydia_Pintscher subscribed.

Thank you, especially for the investigation.

Change 859134 had a related patch set uploaded (by Michael Große; author: Michael Große):

[data-values/value-view@master] Do not cause a huge scrollbar in RTL

https://gerrit.wikimedia.org/r/859134

I'm confused. This code looks ancient. What did change recently that this now is a problem?

Change 860066 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[data-values/value-view@master] Move autoexpand styles into CSS file

https://gerrit.wikimedia.org/r/860066

Change 860066 merged by jenkins-bot:

[data-values/value-view@master] Move autoexpand styles into CSS file

https://gerrit.wikimedia.org/r/860066

Change 860079 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] Bump wikibase-data-values-value-view to HEAD

https://gerrit.wikimedia.org/r/860079

Change 859134 abandoned by Michael Große:

[data-values/value-view@master] Do not cause a huge scrollbar in RTL

Reason:

has been replaced by I7bf03ceeda which is the even nicer solution

https://gerrit.wikimedia.org/r/859134

Change 860079 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Bump wikibase-data-values-value-view to HEAD

https://gerrit.wikimedia.org/r/860079

This should now be verifiable on beta https://wikidata.beta.wmflabs.org/wiki/Q112?uselang=ar, and next week after the train on www.wikidata.org