mirror of
git://develop.git.wordpress.org/
synced 2025-04-29 16:41:00 +02:00
Help/About: Fix closing contextual help when scrolled.
Change from `scrollIntoView` to `scrollIntoViewIfNeeded` so scrolling will only fire when it is required. `scrollIntoViewIfNeeded` is a proprietary method that is not standardized and not currently on a track towards standards. However, testing has it working well, including in Firefox, which supposedly does not support it. Props mikecho, studionashvegas, mai21, piotrek, Heiko_Mamerow, costdev, joedolson. Fixes #55342. git-svn-id: https://develop.svn.wordpress.org/trunk@56243 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9562f40776
commit
b4b0c03adc
@ -1407,8 +1407,8 @@ $( function() {
|
||||
* @return {void}
|
||||
*/
|
||||
$('#contextual-help-link, #show-settings-link').on( 'focus.scroll-into-view', function(e){
|
||||
if ( e.target.scrollIntoView )
|
||||
e.target.scrollIntoView(false);
|
||||
if ( e.target.scrollIntoViewIfNeeded )
|
||||
e.target.scrollIntoViewIfNeeded(false);
|
||||
});
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user