WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#28088 closed defect (bug) (fixed)

wpviews: Safari: unable to copy/paste

Reported by: iseulde Owned by: azaozz
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.9
Component: TinyMCE Keywords: has-patch
Focuses: Cc:

Description

  1. In Safari, you can't copy/paste a wpview after selecting it.
  2. If you put your cursor in a paragraph before or after a wpview, the wpview will be selected visually, but the cursor moves to the start of the first paragraph.
  3. Copying everything in the editor does not include the wpviews.

It looks like TinyMCE fails to select a contenteditable="false" area in Safari on line 96 with editor.selection.select( clipboard, true ).

Attachments (1)

28088-01.patch (471 bytes) - added by gcorne 7 years ago.

Download all attachments as: .zip

Change History (11)

#1 @iseulde
7 years ago

  • Summary changed from Safari: wpviews: unable to copy/paste to wpviews: Safari: unable to copy/paste

@gcorne
7 years ago

#2 @gcorne
7 years ago

This is caused by:

.wpview-wrap,
.wpview-wrap * {
	-moz-user-select: none;
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

28088-01.patch fixes the issue.

#3 @gcorne
7 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.0

#4 @iseulde
7 years ago

Yes! :D

#5 @azaozz
7 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 28565:

wpView: fix selecting a view's text string in Safari, props gcorne, fixes #28088

#6 follow-up: @iseulde
7 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This will need to be .wpview-wrap .wpview-clipboard * if you want html elements inside the clipboard to be selectable (not just text).

#7 in reply to: ↑ 6 @azaozz
7 years ago

Replying to avryl:

Hmm, there shouldn't be any html elements inside the clipboard? The original string (shortcode) together with any html is ran through encodeURIComponent() which encodes pretty much everything except [^a-zA-Z0-9_-].

#9 @azaozz
7 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 28755:

TinyMCE wpView: fix selecting all of view's "text" in Safari, props avryl, fixes #28088

This ticket was mentioned in Slack in #core-editor by afercia. View the logs.


4 years ago

Note: See TracTickets for help on using tickets.