Last modified: 2013-08-27 20:21:54 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 T50604, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48604 - VisualEditor: Selecting and copying one node throws an exception
VisualEditor: Selecting and copying one node throws an exception
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
ContentEditable (Other open bugs)
unspecified
All All
: High normal
: VE-deploy-2013-08-29
Assigned To: Ed Sanders
:
Depends on:
Blocks: 48426
  Show dependency treegraph
 
Reported: 2013-05-18 16:01 UTC by Ed Sanders
Modified: 2013-08-27 20:21 UTC (History)
4 users (show)

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


Attachments

Description Ed Sanders 2013-05-18 16:01:22 UTC
Select an inline node (e.g. an inline image) on it's own (i.e. no whitespace either side of it), and trying to copy will throw an exception (ve.dm.Document.js:786 selection[0].range is undefined)
Comment 1 Christian Williams 2013-06-21 00:14:51 UTC
ooh... that's true.
Comment 2 Inez Korczyński 2013-07-01 20:35:56 UTC
@Ed, @Christian: In which browsers are you guys able to confirm it?
Comment 3 James Forrester 2013-07-09 02:19:06 UTC
I can't reproduce this now in Chrome or Firefox…
Comment 4 Ed Sanders 2013-07-16 16:45:20 UTC
No exception now, it just fails to copy at all if you select a focusable node.

In what looks like a separate bug, if you select around a focusable node, pasting creates a new paragraph, e.g.

Foo "Bar [1] Baz" Quux

copy range marked with double quotes ([1] is a reference) then paste in the middle of Qu_ux and you get:

Foo Bar [1] Baz Qu
Bar [1] Baz
ux

instead of

Foo Bar [1] Baz QuBar [1] Bazux
Comment 5 Ed Sanders 2013-07-17 15:17:08 UTC
The second half of comment 4 might be bug 51538
Comment 6 Ed Sanders 2013-07-17 15:19:10 UTC
Nope, ignore comment 5, it adds the linebreaks no matter which way the selection is generated. Similar outcome but apparently independent.
Comment 7 Ed Sanders 2013-08-26 19:19:48 UTC
https://gerrit.wikimedia.org/r/#/c/80301/ fixes
Comment 8 Gerrit Notification Bot 2013-08-26 19:49:43 UTC
Change 80301 had a related patch set uploaded by Jforrester:
Copy-paste data fixes

https://gerrit.wikimedia.org/r/80301
Comment 9 Gerrit Notification Bot 2013-08-27 20:21:01 UTC
Change 80301 merged by jenkins-bot:
Copy-paste data fixes

https://gerrit.wikimedia.org/r/80301
Comment 10 James Forrester 2013-08-27 20:21:54 UTC
Fixed in master; will be deployed on Thursday as part of the regular push.

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


Navigation
Links