Page MenuHomePhabricator

Scroll textfield and editor to the first edit conflict
Closed, ResolvedPublic


This task is preliminary, based on all the prototype feedback received until August 31st 2016. However, the request for feedback is still ongoing, hence the task is subject to change.

When the edit merge screen is opened, users should immediately see conflicting text.
Therefore, please

  • scroll the "Conflicting Changes" textfield to the first appearance of an edit conflict
  • scroll the "Editor with version to be published" editor to the text that equals "currently published" in the first edit conflict

See also the mock for a general idea (although the scrolling there is only correct in the left column, not in the right)

This is part of fulfilling wish #1 of the German-speaking community wishlist 2015 (T139601).
The solution is a result of on-wiki discussion and Wikimania 2016 sessions and testings, as well as feedback we received to the prototype.

Event Timeline

We talked about scrolling a bit more in the PM-meeting on 18/01/2017:

  • the behavior described in the description still stands
  • additionally, the editor should scroll to the relevant position whenever the user scrolls to a certain conflict in the "Conflicting changes" box

@Jan_Dittrich made the following suggestion as a rough implementation idea:

  • Get diff for “mine” and “theirs”.
  • In a non-visible element, render it with the same style, same size of containing box like the editor right hand, but with markup (spans around changes). No additional padding/margin due to that!
  • Get offset of that span around change, relative to parent element+scroll position. save that.
  • Get the equivalent element in the RENDERED version
  • On click on that rendered element in the diff view, set the scroll position of the editor to the offset.

A prototype (for another project) is available at, specifically at and

Change 333026 had a related patch set uploaded (by WMDE-Fisch):
Auto-scroll editor to foreign change

Change 333026 merged by jenkins-bot:
Auto-scroll text editor to changes

Agreed on auto scrolling to the first own change instead of the first conflict since that makes more sense.

Change 335239 had a related patch set uploaded (by WMDE-Fisch):
Scroll to first own change instead of first conflict

Change 335239 merged by jenkins-bot:
Scroll to first own change instead of first conflict