Page MenuHomePhabricator

Make EditorOverlay usable on Firefox by disabling auto-resizing
Closed, ResolvedPublic3 Estimated Story Points


The code that auto-expands the editor textarea as you type appears to render the editor unusable on Firefox (T214880).
As a temporary fix, let's disable the auto-expand feature in Firefox.

Acceptance criteria

  • Detect the browser is Firefox
  • If Firefox, do not change the height of the textarea

Developer notes

  • Escape the resizeEditor function when the browser is Firefox

QA steps

QA Results

✅ PassedT216547#5008904

Event Timeline

Jdlrobson triaged this task as High priority.Feb 19 2019, 7:43 PM
Jdlrobson created this task.
Jdlrobson moved this task from Incoming to Upcoming on the Readers-Web-Backlog board.
Jdlrobson added a subscriber: iamjessklein.
JTannerWMF moved this task from To Triage to Freezer on the VisualEditor board.Feb 26 2019, 5:11 PM

I'm not fully sure if adding early escape in _resizeEditor method is the best approach. This method is called in two places:

IMHO it would be better to prevent the latter only, we shouldn't resize on each input event (which causes the editor to jump). Resizing the overlay on setContent() might be required, otherwise, the editor might not match the device size. Please verify that.

Jdlrobson set the point value for this task to 3.Feb 27 2019, 5:06 PM

I've been poking around this issue today, and it seems like exiting early in _resizeEditor leaves the editor in a wonky looking state (half the screen blank where the keyboard would be)
but that does fix the issue.
Removing the input event-binding in postRender however, does not fix the issue, which seems strange to me, because it suggests that event is still firing, but I'm not sure where (on setContent?, I don't see the event in the logs, so I'm not sure if the root cause is really _resizeEditor).

Change 494240 had a related patch set uploaded (by Jdrewniak; owner: Jdrewniak):
[mediawiki/extensions/MobileFrontend@master] Disabling editor resizing on Firefox

Change 494240 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Disabling editor resizing on Firefox

@Jdrewniak I pushed a slightly modified version of your patch with Stephen today to make sure the bug fix went out in this week's train. Feel free to improve on that patch at your leisure or call this done. T214880 will remain open :)

Jdlrobson assigned this task to Edtadros.Mar 6 2019, 1:31 AM
Jdlrobson updated the task description. (Show Details)

Over to you Edward.

Edtadros reassigned this task from Edtadros to ovasileva.Mar 7 2019, 5:43 PM
Edtadros added a subscriber: Edtadros.

Test Result

Status: ✅ PASS
OS: macOS Mojave
Browser: Chrome DevTools Device Emulator (iPhone X), Firefox 65.0.1 (64-bit)

Test Artifact(s):
QA steps
Open editor in in Firefox.
Confirm the textarea has scroll

Open editor in in Chrome
Confirm the editor in textarea takes up full screen

Edtadros updated the task description. (Show Details)
ovasileva closed this task as Resolved.Mar 11 2019, 1:00 PM

looks good, resolving

Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptMar 11 2019, 1:00 PM