WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 2 years ago

#29778 new defect (bug)

Editor sidebar scrolling breaks when adding anything above post meta boxes

Reported by: iseulde Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.0
Component: Editor Keywords: has-patch close
Focuses: ui, javascript, administration Cc:

Description

To test add some html with the submitpost_box and submitpage_box hooks.

Attachments (2)

29778.patch (2.5 KB) - added by iseulde 3 years ago.
29778.diff (2.5 KB) - added by AugusGils 3 years ago.

Download all attachments as: .zip

Change History (11)

#1 @iseulde
3 years ago

So what doesn't work is scrolling back up. It's scrolls up to the first box and then whatever's added on top scrolls under it. Until you scroll up all the way.

@iseulde
3 years ago

#2 @iseulde
3 years ago

  • Keywords has-patch added; needs-patch removed

@AugusGils
3 years ago

#3 follow-up: @AugusGils
3 years ago

I had a different approach by putting any newly added content to the #side-sortables div.
I guess it's something we should decide on what's best.

#4 in reply to: ↑ 3 @iseulde
3 years ago

Replying to AugusGils:

I had a different approach by putting any newly added content to the #side-sortables div.
I guess it's something we should decide on what's best.

You're moving the action to the sortable div. So anything that action outputs will become sortable.

#5 @AugusGils
3 years ago

Only if the adder choose this by adding the right classes/html. But yea it will.

#6 @azaozz
3 years ago

29778.diff changes (a bit) how these two actions work by moving them inside the UI droppable element. This may cause incompatibilities with existing plugins. The approach in 29778.patch has full backwards compatibility.

#7 @nacin
3 years ago

  • Milestone changed from 4.0.1 to 4.1

#8 @azaozz
3 years ago

  • Milestone changed from 4.1 to Future Release

Thinking more about this: both patches are not 100% backwards compatible. The first adds another wrapper that may become a problem when a plugin traverses the parent nodes with jQuery. The second adds non-sortable elements inside UI Sortable container that may break in some cases. Not sure which one is better.

Furthermore haven't seen any bug reports about broken sidebar because of this. Would be good to test with existing plugins/code.

Last edited 3 years ago by azaozz (previous) (diff)

#9 @chriscct7
2 years ago

  • Keywords close added
Note: See TracTickets for help on using tickets.