VisualEditor: Selecting and copying one node throws an exception
Closed, ResolvedPublic

Description

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)


Version: unspecified
Severity: normal

Details

Esanders created this task.May 18 2013, 4:01 PM

orbit wrote:

ooh... that's true.

Inez added a comment.Jul 1 2013, 8:35 PM

@Ed, @Christian: In which browsers are you guys able to confirm it?

I can't reproduce this now in Chrome or Firefox…

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

The second half of comment 4 might be bug 51538

Nope, ignore comment 5, it adds the linebreaks no matter which way the selection is generated. Similar outcome but apparently independent.

Change 80301 had a related patch set uploaded by Jforrester:
Copy-paste data fixes

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

Change 80301 merged by jenkins-bot:
Copy-paste data fixes

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

Fixed in master; will be deployed on Thursday as part of the regular push.

Add Comment