Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#39134 closed defect (bug) (fixed)

Customize: custom CSS textarea is scrolled to top when pressing tab

Reported by: celloexpressions's profile celloexpressions Owned by: westonruter's profile westonruter
Milestone: 4.7.1 Priority: normal
Severity: normal Version: 4.7
Component: Customize Keywords: has-patch commit fixed-major
Focuses: javascript Cc:

Description

When there's enough CSS for a scrollbar on the textarea, it jumps to the top whenever you press the tab key. This is a very frustrating experience as a user; milestoning for 4.7.1 for investigation since it's introduced by a new 4.7 feature. See forthcoming screencast.

Attachments (2)

additional-css-tab-scrolltop.gif (684.0 KB) - added by celloexpressions 8 years ago.
39134.diff (982 bytes) - added by tyxla 8 years ago.
Remove textarea scrolltop alteration on keydown

Download all attachments as: .zip

Change History (17)

@tyxla
8 years ago

Remove textarea scrolltop alteration on keydown

#1 @tyxla
8 years ago

  • Focuses javascript added
  • Keywords has-patch added; needs-patch removed

It appears that on tab keydown the scrolltop of the textarea was being altered. I'm not seeing any need for this to be done - in any case, after inserting the tab in the textarea content (with or without enough content to allow scrolling), the browser will not move the scrolled position.

I've attached a diff to remove the alterations that we're doing on the textarea's scrolltop.

#2 @westonruter
8 years ago

  • Owner set to westonruter
  • Status changed from new to accepted

#3 @celloexpressions
8 years ago

It looks like that code was trying specifically to prevent this bug. It's not working correctly, and odd that it works without it. I wonder if this is happening differently in different browsers?

#4 @westonruter
8 years ago

  • Keywords needs-testing added

Agreed. We need to run this through the various browsers.

See #38667 where this was introduced.

The patch was first developed by @coffee2code in https://meta.trac.wordpress.org/changeset/3316

#5 @sstoqnov
8 years ago

  • Keywords needs-testing removed

Tested and it works on all major browsers ( Chrome, Safari, Opera and Firefox ).

#6 @westonruter
8 years ago

  • Keywords needs-testing added

@sstoqnov and what about IE9 and above?

#7 @sstoqnov
8 years ago

  • Keywords needs-testing removed

@westonruter just tested and It works on IE7+ and above.

Last edited 8 years ago by sstoqnov (previous) (diff)

#8 @westonruter
8 years ago

@sstoqnov oh, you tested in IE7? I'm surprised you were able to get the customizer to even load since the customizer is only supported in IE9+ now.

@celloexpressions this also works in IE on your system?

#9 @sstoqnov
8 years ago

  • Keywords needs-testing added

@westonruter I am using Mac and tested in Browserstack. Not sure if I am wrong or their software doesn't work at all.
Maybe will be better if someone that uses Windows can test this again.

This ticket was mentioned in Slack in #core-customize by celloexpressions. View the logs.


8 years ago

#11 @tyxla
8 years ago

  • Keywords needs-testing removed

I've just tested on Windows 10 and I verify that it works as expected on IE9 and above.

#12 @celloexpressions
8 years ago

  • Keywords commit added

Confirmed that 39134.diff works in Edge, IE11, and IE11 emulating IE9. Let's commit.

#13 @westonruter
8 years ago

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

In 39557:

Customize: Prevent scrolling custom_css textarea to top when pressing tab.

Props tyxla, sstoqnov for testing, celloexpressions for testing.
See #38667.
Fixes #39134.

#14 @westonruter
8 years ago

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

Re-opening for 4.7.1

#15 @dd32
8 years ago

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

In 39569:

Customize: Prevent scrolling custom_css textarea to top when pressing tab.

Props tyxla, sstoqnov for testing, celloexpressions for testing.
See #38667.
Merges [39557] to the 4.7 branch.
Fixes #39134.

Note: See TracTickets for help on using tickets.