Page MenuHomePhabricator

Infinite horizontal scroll when using horizontal resizer
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

With Realtime Preview open, when I move the horizontal resizer to the right, I can keep going indefinitely.

This only happens in Vector 2022 with the left-hand menu open.

It is particularly bad if the article has wide, non-wrappable elements like tables (see second example gif below).

Quoting @MusikAnimal in T313376#8098208:

Looks like the issue described at T306877#8093774 (now part of this task) was introduced with the new Vector grid system (T312241, enabled with r808258). .mw-content-container now has the CSS rule max-width: none, which as Dom points out is only present when the left sidebar is open in Vector 2022. It also only effects wide viewports as specified by @width-breakpoint-desktop-wide (currently ~1200px).

Steps to reproduce problem
  1. Login to any beta site or https://mediawiki.org
  2. Go to Special:Preferences and click "Beta features"
  3. Enable the "Realtime Preview" beta feature
  4. On editing tab mark "Temporarily disable the visual editor while it is in beta" and save
  5. Edit any page with the WikiEditor
  6. Expand the left-hand menu (if it is not already expanded)
  7. Click "Preview" to open Realtime Preview
  8. Click the horizontal resizer and resize it to the right

Expected behavior: The overall width of the WikiEditor remains the same.
Observed behavior: You can keep scrolling to the right indefinitely.

Environment

Browser: Firefox 91, Chromium 87.
Wiki(s): https://www.mediawiki.org MediaWiki 1.39.0-wmf.23 (ebb8bac) 00:09, 2 August 2022.
Editor: WikiEditor 0.5.3 (6ec8074) 12:27, 1 August 2022.
Skin: Vector 1.0.0 (ea5c4d3) 15:47, 1 August 2022.

Screenshots

Example of infinite scroll:

horizontal_resize_overflow_2.gif (768×1 px, 3 MB)

Example of an article with wide elements (article here). You only need to touch the horizontal scroll bar to see the bug:

infinite_horizontal_scroll_example2.gif (768×1 px, 622 KB)

Event Timeline

Jdlrobson subscribed.

Community-Tech: Let us know if we can help in any way.

Community-Tech: Let us know if we can help in any way.

Thanks! As stated in the description, I attempted to fix this but couldn't find a way without overriding something in Vector, which I felt wasn't acceptable. We eventually decided it wasn't a major issue and product-wise are content with shipping Realtime Preview with this caveat, but if there's an easy fix or a direction you can send us towards a workable solution that'd be great :)

I should add that we of course can hack something into ResizingDragBar.js. I didn't dabble with that idea much though so maybe there's something we can try there... I'll look when I get the time. For now, we're only asking Vector maintainers for a quick solution should one exist (don't worry about having to touch WikiEditor!).

@MusikAnimal I think we need to add max-width: 100%; rule to the .mw-editform #wpTextbox1 selector. Once that's done this will be fixed by T314567.

@MusikAnimal this should be fixed in production now (We backported the fix to T314756). Can you confirm?

@MusikAnimal this should be fixed in production now (We backported the fix to T314756). Can you confirm?

I cannot reproduce this on mediawiki.org or beta.

Jdlrobson claimed this task.

Great!