Skip to content

Commit c77f0f9

Browse files
author
koopersmith
committed
Don't open a pointer when the target element is hidden. fixes #19357.
git-svn-id: http://core.svn.wordpress.org/trunk@19482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 7cde4ab commit c77f0f9

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

wp-includes/js/wp-pointer.dev.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,7 @@
218218
var self = this,
219219
o = this.options;
220220

221-
if ( this.active || o.disabled )
222-
return;
223-
224-
if ( this.element.is(':hidden') )
221+
if ( this.active || o.disabled || this.element.is(':hidden') )
225222
return;
226223

227224
this.update().done( function() {
@@ -233,7 +230,7 @@
233230
var self = this,
234231
o = this.options;
235232

236-
if ( this.active || o.disabled )
233+
if ( this.active || o.disabled || this.element.is(':hidden') )
237234
return;
238235

239236
this.active = true;

wp-includes/js/wp-pointer.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wp-includes/script-loader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function wp_default_scripts( &$scripts ) {
9696
'broken' => __('An unidentified error has occurred.')
9797
) );
9898

99-
$scripts->add( 'wp-pointer', "/wp-includes/js/wp-pointer$suffix.js", array( 'jquery-ui-widget', 'jquery-ui-position' ), '20111129', 1 );
99+
$scripts->add( 'wp-pointer', "/wp-includes/js/wp-pointer$suffix.js", array( 'jquery-ui-widget', 'jquery-ui-position' ), '20111129a', 1 );
100100
$scripts->localize( 'wp-pointer', 'wpPointerL10n', array(
101101
'dismiss' => __('Dismiss'),
102102
) );

0 commit comments

Comments
 (0)