Make WordPress Core

Opened 7 years ago

Closed 11 months ago

#29778 closed defect (bug) (worksforme)

Editor sidebar scrolling breaks when adding anything above post meta boxes

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


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

Attachments (2)

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

Download all attachments as: .zip

Change History (12)

#1 @iseulde
7 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.

7 years ago

#2 @iseulde
7 years ago

  • Keywords has-patch added; needs-patch removed

7 years ago

#3 follow-up: @AugusGils
7 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
7 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
7 years ago

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

#6 @azaozz
7 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
7 years ago

  • Milestone changed from 4.0.1 to 4.1

#8 @azaozz
7 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 7 years ago by azaozz (previous) (diff)

#9 @chriscct7
6 years ago

  • Keywords close added

#10 @noisysocks
11 months ago

  • Milestone Future Release deleted
  • Resolution set to worksforme
  • Status changed from new to closed

I tested this by adding a <p> with a large paragraph in it to submitpost_box. I wasn't able to see any issues with scrolling.

Going to close this, but happy to re-open if I've missed something.

Note: See TracTickets for help on using tickets.