Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#20608 closed defect (bug) (fixed)

DFW grows per keystroke in Webkit browsers

Reported by: dllh Owned by: azaozz
Milestone: 3.4 Priority: high
Severity: major Version: 3.4
Component: Editor Keywords:
Focuses: Cc:



  1. Start a new post in Chrome or Safari on the Mac (untested in Win).
  2. Enter distraction-free mode in visual mode or toggle to visual mode.
  3. Start typing.

Expected: The post box will resize only as needed as the post content grows.

Actual: The box grows by a line with each keystroke.

I've tested only on the Mac so far, and it's reproducible in Safari and Chrome, in visual mode only. It does not repro in 3.3.2 or in Firefox.

Attachments (1)

20608.patch (539 bytes) - added by SergeyBiryukov 3 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 @nacin3 years ago

  • Milestone changed from Awaiting Review to 3.4
  • Priority changed from normal to high
  • Severity changed from normal to major

It does not repro in 3.3.2

comment:2 @nacin3 years ago

Related, #19649.

@SergeyBiryukov3 years ago

comment:3 follow-up: @SergeyBiryukov3 years ago

Same in Chrome for Windows.

Introduced in [19830]. Doesn't happen with 20608.patch (not sure if that's a proper fix though).

comment:4 @dllh3 years ago

I can confirm that the patch fixes the issue.

comment:5 @azaozz3 years ago

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

In [20723]:

DFW: fix auto-resize in WebKit, fixes #20608

comment:6 @azaozz3 years ago

In [20724]:

Remove unneeded var added in [20723], see #20608

comment:7 in reply to: ↑ 3 @azaozz3 years ago

Replying to SergeyBiryukov:

Resizing onKeyUp is needed when the user types near the bottom of the editor and the line wraps.

comment:8 follow-up: @Ipstenu3 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This is still happening right now. I'm on revision 20794.

comment:9 in reply to: ↑ 8 @SergeyBiryukov3 years ago

Replying to Ipstenu:

This is still happening right now. I'm on revision 20794.

Confirmed. Checked out r20723 as well. Seems that the fix didn't work (or stopped working since then).

See also #20684.

comment:10 @azaozz3 years ago

In [20804]:

DFW: another attempt to get auto-resize working right, see #20608, see #20684

comment:11 @azaozz3 years ago

Seems WebKit cannot make it's mind how to handle the height of body.contentEditable in an iframe when the iframe is resized.

comment:12 @SergeyBiryukov3 years ago

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

Tested in Firefox 12, Chrome 19, IE 8, Opera 11.64, Safari 5.1.5. Works fine now.

Note: See TracTickets for help on using tickets.