Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#30760 closed defect (bug) (fixed)

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

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

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 12 years ago.
30760.2.patch​ (593 bytes ) - added by iseulde 12 years ago.

Download all attachments as: .zip

Change History (14)

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


12 years ago

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


12 years ago

#3 @iseulde
12 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
12 years ago

  • Focuses javascript added
  • Keywords needs-patch added
  • Milestone Awaiting Review → Future Release
  • Version trunk → 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.

#5 @iseulde
12 years ago

  • Keywords has-patch added; needs-patch removed

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


12 years ago

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

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


12 years ago

#9 @iseulde
12 years ago

  • Milestone Future Release → 4.1.1

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

#10 @azaozz
12 years ago

  • Owner set to azaozz
  • Resolution → fixed
  • Status new → 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
12 years ago

  • Keywords fixed-major commit added
  • Resolution fixed
  • Status closed → reopened

Reopen for eventual 4.1.1 consideration.

#12 @dd32
12 years ago

  • Keywords fixed-major removed
  • Milestone 4.1.1 → 4.2
  • Resolution → fixed
  • Status reopened → 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.