WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#29380 closed defect (bug) (fixed)

Pasting content before a gallery shows after the gallery

Reported by: Ipstenu Owned by: iseulde
Milestone: 4.0.1 Priority: normal
Severity: normal Version: 4.0
Component: TinyMCE Keywords: fixed-major commit
Focuses: Cc:
PR Number:

Description

Reported by bduclos in alpha/beta

  1. In visual mode, create a post and add a gallery.
  2. Copy some content to your clipboard
  3. Click BEFORE the gallery: https://cloudup.com/cuNUGTjTEI5
  4. Paste.

The text will show up after the gallery, not before.

Attachments (3)

29380.patch (804 bytes) - added by iseulde 5 years ago.
29380.2.patch (4.4 KB) - added by iseulde 5 years ago.
29380.3.patch (2.1 KB) - added by iseulde 5 years ago.

Download all attachments as: .zip

Change History (22)

This ticket was mentioned in IRC in #wordpress-dev by ipstenu. View the logs.


5 years ago

#2 @bduclos
5 years ago

Same issue when inserting a new image (or gallery video, audio, using the Add Media button) before the gallery.

  1. In visual mode, create a post and add a gallery.
  2. Click BEFORE the gallery: https://cloudup.com/cuNUGTjTEI5
  3. Click Add Media to insert an image (or gallery, video, audio)

The new image will show up after the gallery, not before.

Last edited 5 years ago by bduclos (previous) (diff)

This ticket was mentioned in IRC in #wordpress-dev by helen. View the logs.


5 years ago

#4 @iseulde
5 years ago

  • Component changed from Editor to TinyMCE
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

This happens for all views. Looks like we forgot about this case.

#5 @azaozz
5 years ago

Yeah, we can add a case for this. For now the workaround is to click/place the caret before the view, then hit Enter to make a new paragraph before pasting.

#6 @iseulde
5 years ago

  • Milestone changed from Future Release to 4.0.1

Moving to 4.0.1 for consideration.

This ticket was mentioned in IRC in #wordpress-dev by MarkJaquith. View the logs.


5 years ago

This ticket was mentioned in IRC in #wordpress-dev by nacin. View the logs.


5 years ago

#9 @nacin
5 years ago

  • Owner set to avryl
  • Status changed from new to assigned

#10 @iseulde
5 years ago

  • Keywords has-patch added; needs-patch removed

@iseulde
5 years ago

#11 @iseulde
5 years ago

I think we should fix this for 4.0.1. There's some code that runs on BeforeSetContent that we should look at for 4.1. Maybe it's not necessary anymore, else it should be adjusted a bit.

@iseulde
5 years ago

#12 @iseulde
5 years ago

A much better patch, I think.

This fixes another, smaller issue too. When your cursor is before a view and a command is fired that doesn't insert any content, such as the kitchen sink toggle, the cursor moves from the left to the right.

#13 @iseulde
5 years ago

  • Keywords needs-testing added

@iseulde
5 years ago

#14 @iseulde
5 years ago

Patch .3 should be "safe" to add to 4.0.1. We can consider .2 for 4.1.

#15 @azaozz
5 years ago

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

In 29766:

TinyMCE wpView: when pasting/inserting content before a view, add new paragraph above it and insert the content there. Props avryl, fixes #29380 for trunk.

#16 @azaozz
5 years ago

  • Keywords fixed-major commit added; has-patch needs-testing removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen for 4.0.1

#17 @jeremyfelt
5 years ago

29380.3.patch applies cleanly to the 4.0 branch, resolves the reported issue, and is ready for merge.

#18 @jeremyfelt
5 years ago

The above is the long way of saying [29766] is good to merge with 4.0.

#19 @nacin
5 years ago

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

In 30257:

TinyMCE wpView: when pasting/inserting content before a view, add new paragraph above it and insert the content there.

Merges [29766] to the 4.0 branch.

props avryl.
fixes #29380.

Note: See TracTickets for help on using tickets.