Page MenuHomePhabricator

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



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:16 AM
bzimport set Reference to bz48604.

@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

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

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

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