Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#30760 closed defect (bug) (fixed)

Enable/disable full-height editor doesn't toggle without refreshing

Reported by: clorith's profile Clorith Owned by: azaozz's profile azaozz
Milestone: 4.2 Priority: normal
Severity: normal Version: 4.0
Component: Editor Keywords: has-patch commit
Focuses: ui, javascript Cc:

Description

When toggling the option Enable full-height editor and distraction-free functionality under Screen Options the editor would snap into it's appropriate size in 4.0

In 4.1 it just leaves the full height editor and moves the status bar of it to the end of the document, refreshing the page brings the editor size down as expected.

Attachments (2)

30760.patch (577 bytes) - added by iseulde 10 years ago.
30760.2.patch (593 bytes) - added by iseulde 10 years ago.

Download all attachments as: .zip

Change History (14)

This ticket was mentioned in Slack in #core by clorith. View the logs.


10 years ago

This ticket was mentioned in Slack in #feature-focus by clorith. View the logs.


10 years ago

#3 @iseulde
10 years ago

Could you give a bit more steps to reproduce?

When I uncheck it, the editor resizes to the height the user set it to before or the default if nothings was set.

#4 @iseulde
10 years ago

  • Focuses javascript added
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Version changed from trunk to 4.0

It looks like this only happens when there is no value in the user settings. In PHP there is a fallback to the default and the size can't be less than 50 or more than 5000 if the user setting is used. In JS the value is directly taken from the user settings: var height = window.getUserSetting('ed_size'); on line 685 of editor-expand.js without any additional checks or fallback.

@iseulde
10 years ago

#5 @iseulde
10 years ago

  • Keywords has-patch added; needs-patch removed

This ticket was mentioned in Slack in #feature-focus by janneke. View the logs.


10 years ago

@iseulde
10 years ago

#7 @azaozz
10 years ago

This is not a regression, that code is exactly the same in 4.0: https://core.trac.wordpress.org/browser/branches/4.0/src/wp-admin/js/editor-expand.js#L638.

Can be annoying if the user turns off editor expand for the first time while editing longer post, "fixes itself" after the first manual resizing of the editor.

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

This ticket was mentioned in Slack in #core by azaozz. View the logs.


10 years ago

#9 @iseulde
10 years ago

  • Milestone changed from Future Release to 4.1.1

Also relevant for 4.0.2. If too minor, please set to 4.2.

#10 @azaozz
10 years ago

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

In 30977:

Editor: when switching editor-expand off for the first time use the default editor height. Props avryl, fixes #30760 for trunk.

#11 @azaozz
10 years ago

  • Keywords fixed-major commit added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen for eventual 4.1.1 consideration.

#12 @dd32
9 years ago

  • Keywords fixed-major removed
  • Milestone changed from 4.1.1 to 4.2
  • Resolution set to fixed
  • Status changed from reopened to closed

Seems like a small enough edgecase to skip 4.0/4.1 inclusion to me, the experience isn't significantly broken, and you do gain the resize handle when disabling DFW/expand.

Note: See TracTickets for help on using tickets.