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


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 ( selection[0].range is undefined)

Version: unspecified
Severity: normal

bzimport set Reference to bz48604.
Esanders created this task.Via LegacyMay 18 2013, 4:01 PM
bzimport added a comment.Via ConduitJun 21 2013, 12:14 AM

orbit wrote:

ooh... that's true.

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

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

Jdforrester-WMF added a comment.Via ConduitJul 9 2013, 2:19 AM

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

Esanders added a comment.Via ConduitJul 16 2013, 4:45 PM

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

instead of

Foo Bar [1] Baz QuBar [1] Bazux

Esanders added a comment.Via ConduitJul 17 2013, 3:17 PM

The second half of comment 4 might be bug 51538

Esanders added a comment.Via ConduitJul 17 2013, 3:19 PM

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

gerritbot added a comment.Via ConduitAug 26 2013, 7:49 PM

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

gerritbot added a comment.Via ConduitAug 27 2013, 8:21 PM

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

Jdforrester-WMF added a comment.Via ConduitAug 27 2013, 8:21 PM

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

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.