Last modified: 2014-03-21 22:48:09 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 T60003, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58003 - VisualEditor: "Uncaught Error:Invalid start offset:-1" shows up while deleting the bullets of a bulleted list
VisualEditor: "Uncaught Error:Invalid start offset:-1" shows up while deletin...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Data Model (Other open bugs)
unspecified
All All
: High normal
: ---
Assigned To: D Chan
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-04 21:29 UTC by Rummana Yasmeen
Modified: 2014-03-21 22:48 UTC (History)
7 users (show)

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


Attachments
video capture of the bug (4.76 MB, video/quicktime)
2013-12-13 17:55 UTC, Rummana Yasmeen
Details
Reproduced on 6th Jan (127.16 KB, image/png)
2014-01-06 17:40 UTC, Rummana Yasmeen
Details

Description Rummana Yasmeen 2013-12-04 21:29:59 UTC
Steps to reproduce:

There are several issues in this bug.I tried to document all of them chronologically in one issue for convenience.


1.click on the Edit button
2.click on the bullet list icon.
3.Click on tab to add indentation to the list for several times.
4.Now press Enter/Return
5.It deletes the bullets, where as pressing delete does not do that.
6.After deleting all the bullets by pressing return it goes to the next line 
7.Again add bulleted list with indentation on the first line
8.Now this time if you press Enter it goes to the next line but does not add next bullet.
9.Now go to the end of the first line and press enter, this time the next bullet gets added.
10.Now try adding indentation to the second item , it does not work
11.Delete the bullet and repeat the action again,this time it will add indentation.
12.Now if you save the page , you will see there is no bullets in the read mode
13.If you try to delete all the content by selecting with mouse pad, it gives the error:
"Uncaught Error:Invalid start offset:-1"


Test Environment: production
Browser: Chrome Version 26.0.1410.65 & FF 25
OS: MAC OS X 10. 8. 5 
Example Page where in the read mode there is no bullets but in the edit mode they appear:

http://en.wikipedia.beta.wmflabs.org/wiki/New_bullet
Comment 1 Rummana Yasmeen 2013-12-06 23:36:59 UTC
Another way to reproduce the error "Uncaught Error:Invalid start offset:-1"

1.Open the editor
2.Add a text 
3.Go the next line add a bullet list with a text
4.Add indentation to that item
5.Press enter go to the next line then add indentation to the second empty bullet item
6.Press enter to go to the next line
7.It actually takes the cursor to the end of first bulleted item
8.Press delete until all the bullets comes in the same line.
9.The cursor then moves to the end of the first line of step 2
10.Delete that text
11.Now place your cursor at the end of series bullets press delete to delete it

A. you will get the error:Uncaught TypeError: Cannot call method 'getOffset' of null

B. If you again press delete , you will get "Uncaught Error:Invalid start offset:-1"

C. if you press undo then redo, you will get "Uncaught Error: Unbalanced input passed to document"

D. if you attempt to save the page, you will get "Uncaught TypeError: Cannot set property 'lastOuterPost' of null"
Comment 2 Ed Sanders 2013-12-13 10:57:09 UTC
Steps 1-7 are as expected. I don't understand step 8, as after 7 there is only one double-indented bullet item.
Comment 3 Rummana Yasmeen 2013-12-13 17:55:03 UTC
Created attachment 14088 [details]
video capture of the bug
Comment 4 Ed Sanders 2014-01-06 17:22:34 UTC
I've reproduced the steps in the video but I don't get an exception. Can you try again with the latest code.
Comment 5 Rummana Yasmeen 2014-01-06 17:36:03 UTC
Yes , I can still reproduce it.Attaching the screenshot.
Are you getting the error:Uncaught TypeError: Cannot call method 'getOffset' of null ?
Comment 6 Rummana Yasmeen 2014-01-06 17:40:36 UTC
Created attachment 14234 [details]
Reproduced on 6th Jan
Comment 7 James Forrester 2014-02-06 05:01:44 UTC
I can't reproduce this problem as written (Chrome here too), but there is some funkiness related to being able to split some mutli-depth bullet list items oddly.
Comment 8 Rummana Yasmeen 2014-02-06 22:57:22 UTC
Giving steps to reproduce again:

1.Open a completely new page with VE
2.Add a text
3.Click on Bullet list icon from the toolbar
4.Add indentation to that line
5.Go to the next line (Adds a second bullet)
6.Add indentation to this second bullet line too
7.Go back to the first bullet point and delete the text
8.Go back to end of the second empty bullet point
9.Press Delete(this will bring all the bullet points in one line)

After this step you will get the error:Uncaught TypeError: Cannot call method 'getOffset' of null 

If you press Delete again it will show error Uncaught Error: Invalid start offset: -1
Comment 9 James Forrester 2014-03-21 22:48:09 UTC
Looks like this was done as part of the "handle enter" re-write.

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


Navigation
Links