Page MenuHomePhabricator

Can't copy a single node selection (e.g. template / media / reference) in Safari
Closed, ResolvedPublic8 Estimated Story Points

Description

I can't copy template or media with Safari on MAC OS X : Cmd C
Text copy is OK

You can copy template or media with Chrome on MAC OS X (in VE edit mode) and then paste them in Safari

Safari 7.0.6
Chrome 36
MAC OS X 10.9


Version: unspecified
Severity: major

Event Timeline

Confirming the issue in Safari.

Browser bugs are fun, aren't they? :-(

I can't paste list items in Safari today. Being able to copy content seems like a pretty basic task.

Jdforrester-WMF renamed this task from VisualEditor: Can't copy a single node selection (e.g. template / media / reference) in Safari to Can't copy a single node selection (e.g. template / media / reference) in Safari.Mar 19 2015, 2:29 AM
Jdforrester-WMF set Security to None.
Jdforrester-WMF edited a custom field.

Safari appears to block copy operations when the selection is collapsed. This doesn't occur if the selection is covering an element styled as "user-select: none", so I suspect there's a way to get around this without any browser selection rendering.

https://jsfiddle.net/6oqvdr9t/

The selection shouldn't be collapsed, we already work around this by selecting a single space in the paste target when you click on a focusable node.

The bug appears to be that in Safari you can't programmatically select a single space(!?!). Changing the space to some other character appears to fix the problem.

Change 198484 had a related patch set uploaded (by Esanders):
Fix focusable node copy in Safari by using non WS selection

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

Change 198484 merged by jenkins-bot:
Fix focusable node copy in Safari by using non WS selection

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

Safari 7.1.2

  • cannot copy images within the page
  • copying templates is selective: copying {{Use British English}} is OK; cannot copy: {{Cite web|url = http://www.googlecom|title = google|date = |accessdate = |website = |publisher = |last = |first = }} etc

    I can copy much more from Chrome to Safari (as it was mentioned in the ticket):
  • templates such as Cite web
  • images

Re-checked the cases from my previous comment with 1.25wmf24 (rMW32a0b3fcf8c1) deploy.