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. Built from https://develop.svn.wordpress.org/trunk@56243 git-svn-id: http://core.svn.wordpress.org/trunk@55755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7a703a1b0f
commit
aa7c98232f
|
@ -1407,8 +1407,8 @@ $( function() {
|
||||||
* @return {void}
|
* @return {void}
|
||||||
*/
|
*/
|
||||||
$('#contextual-help-link, #show-settings-link').on( 'focus.scroll-into-view', function(e){
|
$('#contextual-help-link, #show-settings-link').on( 'focus.scroll-into-view', function(e){
|
||||||
if ( e.target.scrollIntoView )
|
if ( e.target.scrollIntoViewIfNeeded )
|
||||||
e.target.scrollIntoView(false);
|
e.target.scrollIntoViewIfNeeded(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.3-beta4-56242';
|
$wp_version = '6.3-beta4-56243';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue