Last modified: 2014-04-17 22:50:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T65209, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63209 - VisualEditor: Changing format of a list item right above a nested list item breaks
VisualEditor: Changing format of a list item right above a nested list item b...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Data Model (Other open bugs)
unspecified
All All
: Normal major
: VE-deploy-2014-04-10
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-27 23:15 UTC by Rummana Yasmeen
Modified: 2014-04-17 22:50 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Screenshot (154.34 KB, image/png)
2014-03-27 23:15 UTC, Rummana Yasmeen
Details

Description Rummana Yasmeen 2014-03-27 23:15:56 UTC
Created attachment 14949 [details]
Screenshot

Steps to reproduce:

1.Open a page with
2,Add a bullet list or numbered list
3.Add an empty bullet item 
4.Add indentation to it
5.Select the previous item
6.Change the paragraph style of the previous item


Observed Result:
An error appears in the console
Uncaught Error: Unbalanced set of replace operations found 

Now press enter to add another item :
Uncaught Error: Unbalanced input passed to document 

Press undo:
Uncaught Error: Offset could not be translated to a DOM element and offset

See the screenshot attached

Test Environment: https://test2.wikipedia.org/
Browser: Chrome Version 26.0.1410.65 & FF 25
OS: MAC OS X 10. 8. 5 
Page:https://test2.wikipedia.org/wiki/27thmarChrome?veaction=edit
Comment 1 Roan Kattouw 2014-04-03 20:48:01 UTC
It suffices to do a format change on any list item that has a nested list item directly beneath it. In other words, if you have the list

* Foo
* Bar
** Baz

then changing "Bar" to a heading will break. It doesn't matter if "Baz" is empty, it just has to be at a deeper list level than "Bar".
Comment 2 Roan Kattouw 2014-04-03 21:04:10 UTC
I've figured out why this bug happens and I know how to fix it. I have to go now but I'll write a patch when I get back (~1.5 hours)
Comment 3 Gerrit Notification Bot 2014-04-04 18:06:36 UTC
Change 123892 had a related patch set uploaded by Catrope:
Adjust range manually in isolateAndUnwrap()

https://gerrit.wikimedia.org/r/123892
Comment 4 Gerrit Notification Bot 2014-04-07 23:10:58 UTC
Change 124493 had a related patch set uploaded by Catrope:
Exclude insertions in ve.dm.SurfaceFragment#isolateAndUnwrap

https://gerrit.wikimedia.org/r/124493
Comment 5 Gerrit Notification Bot 2014-04-08 03:33:55 UTC
Change 123892 abandoned by Catrope:
Adjust range manually in isolateAndUnwrap()

Reason:
Superseded by https://gerrit.wikimedia.org/r/#/c/124493/

https://gerrit.wikimedia.org/r/123892
Comment 6 Gerrit Notification Bot 2014-04-10 04:45:17 UTC
Change 124493 merged by jenkins-bot:
Exclude insertions in ve.dm.SurfaceFragment#isolateAndUnwrap

https://gerrit.wikimedia.org/r/124493
Comment 7 Rummana Yasmeen 2014-04-14 23:54:01 UTC
Verified the fix on test 2
Comment 8 Rummana Yasmeen 2014-04-17 22:50:53 UTC
Verified the fix in:https://en.wikipedia.org/wiki/User:RYasmeen_(WMF)/sandbox?veaction=edit

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links