Last modified: 2013-09-29 17:14:45 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 T52947, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50947 - VisualEditor: Blanking the page using Ctrl-A and Delete keys prevents further editing in Firefox
VisualEditor: Blanking the page using Ctrl-A and Delete keys prevents further...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
ContentEditable (Other open bugs)
unspecified
All All
: High major
: VE-deploy-2013-10-03
Assigned To: Krinkle
:
: 50519 51169 52125 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-08 15:38 UTC by Amir E. Aharoni
Modified: 2013-09-29 17:14 UTC (History)
10 users (show)

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


Attachments

Description Amir E. Aharoni 2013-07-08 15:38:54 UTC
To reproduce:

* Edit a page with some existing content in VisualEditor.
* Press Ctrl-A to select the whole text.
* Press the Delete key.

Observed: The page cannot be edited any more.

Expected: The page doesn't have any text, but text can be added.
Comment 1 Roan Kattouw 2013-07-10 02:06:29 UTC
Do any JS errors appear in the console while you do this?
Comment 2 Amir E. Aharoni 2013-07-10 08:14:57 UTC
Yes.

In RL debug mode I got this:

--
[11:13:55.789] TypeError: node.getParent(...) is null @ https://bits.wikimedia.org/static-1.22wmf8/extensions/VisualEditor/modules/ve/ce/ve.ce.Surface.js:1265

It only happens in Firefox.
Comment 3 James Forrester 2013-07-17 16:46:23 UTC
*** Bug 50519 has been marked as a duplicate of this bug. ***
Comment 4 James Forrester 2013-07-17 16:46:55 UTC
*** Bug 51169 has been marked as a duplicate of this bug. ***
Comment 6 Krinkle 2013-07-24 00:59:27 UTC
Looking into it now.
Comment 7 James Forrester 2013-07-30 15:46:38 UTC
*** Bug 52125 has been marked as a duplicate of this bug. ***
Comment 8 JohnCD67 2013-08-12 17:55:20 UTC
Occurs with Vector/Win7/FF23.0. It doesn't matter whether Ctr-A or Right-click/Select all is used, or whether "Delete" or "Backspace" is used to delete.
Comment 9 Chris McKenna 2013-09-22 21:52:23 UTC
This is still happening with Firefox 24 on Linux using the monobook skin (other combinations not tested)
Comment 10 Krinkle 2013-09-26 16:53:47 UTC
When the document loads in Firefox (Firefox 24, Mac) ve.ce.Document#getNodeAndOffset gets called with offset=1 to show initial selection (range: 1,1).

When selecting all and pressing backspace, ve.ce.Document#getNodeAndOffset gets called with offset = -1.

It gets there from ve.ce.Surface#handleDelete, which has a rangeToRemove (from this.model.getSelection) of 0,0.

The #handleDelete method then sees the range is collapsed, and since backspace=true, it will get a relative range on the document from the (collapsed) 0,0 rangeToRemove to -1.
Comment 11 Gerrit Notification Bot 2013-09-27 19:15:27 UTC
Change 86299 had a related patch set uploaded by Krinkle:
ce.BranchNode: Insert slugs based on CE children length, not DM

https://gerrit.wikimedia.org/r/86299
Comment 12 Krinkle 2013-09-27 19:17:37 UTC
This bug has been fixed somewhere in the past week. The range is no longer (0,0) but (0,[document length]). The document no longer crashes and properly deletes all content.

However this uncovered another bug, namely that in Firefox deleting the selection now leaves the document completely empty (not even a placeholder <p> to start typing again). That is what change 86299 (https://gerrit.wikimedia.org/r/86299) addresses.

However this bug is fixed, though I don't know which commit fixed it.
Comment 13 Gerrit Notification Bot 2013-09-29 17:14:45 UTC
Change 86299 merged by jenkins-bot:
ce.BranchNode: Insert slugs based on CE children length, not DM

https://gerrit.wikimedia.org/r/86299

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


Navigation
Links