<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[19482] trunk/wp-includes: Don't open a pointer when the target element is hidden.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/19482">19482</a></dd>
<dt>Author</dt> <dd>koopersmith</dd>
<dt>Date</dt> <dd>2011-11-29 19:43:24 +0000 (Tue, 29 Nov 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Don't open a pointer when the target element is hidden. fixes <a href="http://core.trac.wordpress.org/ticket/19357">#19357</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesjswppointerdevjs">trunk/wp-includes/js/wp-pointer.dev.js</a></li>
<li><a href="#trunkwpincludesjswppointerjs">trunk/wp-includes/js/wp-pointer.js</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesjswppointerdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/wp-pointer.dev.js (19481 => 19482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/wp-pointer.dev.js        2011-11-29 18:56:13 UTC (rev 19481)
+++ trunk/wp-includes/js/wp-pointer.dev.js        2011-11-29 19:43:24 UTC (rev 19482)
</span><span class="lines">@@ -218,12 +218,9 @@
</span><span class="cx">                         var self = this,
</span><span class="cx">                                 o    = this.options;
</span><span class="cx"> 
</span><del>-                        if ( this.active || o.disabled )
</del><ins>+                        if ( this.active || o.disabled || this.element.is(':hidden') )
</ins><span class="cx">                                 return;
</span><span class="cx"> 
</span><del>-                        if ( this.element.is(':hidden') )
-                                return;
-
</del><span class="cx">                         this.update().done( function() {
</span><span class="cx">                                 self._open( event );
</span><span class="cx">                         });
</span><span class="lines">@@ -233,7 +230,7 @@
</span><span class="cx">                         var self = this,
</span><span class="cx">                                 o    = this.options;
</span><span class="cx"> 
</span><del>-                        if ( this.active || o.disabled )
</del><ins>+                        if ( this.active || o.disabled || this.element.is(':hidden') )
</ins><span class="cx">                                 return;
</span><span class="cx"> 
</span><span class="cx">                         this.active = true;
</span></span></pre></div>
<a id="trunkwpincludesjswppointerjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/wp-pointer.js (19481 => 19482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/wp-pointer.js        2011-11-29 18:56:13 UTC (rev 19481)
+++ trunk/wp-includes/js/wp-pointer.js        2011-11-29 19:43:24 UTC (rev 19482)
</span><span class="lines">@@ -1 +1 @@
</span><del>-(function(c){var a=0,b=9999;c.widget(&quot;wp.pointer&quot;,{options:{pointerClass:&quot;wp-pointer&quot;,pointerWidth:320,content:function(f,e,d){return c(this).text()},buttons:function(f,e){var g=(wpPointerL10n)?wpPointerL10n.dismiss:&quot;Dismiss&quot;,d=c('&lt;a class=&quot;close&quot; href=&quot;#&quot;&gt;'+g+&quot;&lt;/a&gt;&quot;);return d.bind(&quot;click.pointer&quot;,function(h){h.preventDefault();e.element.pointer(&quot;close&quot;)})},position:&quot;top&quot;,show:function(e,d){d.pointer.show();d.opened()},hide:function(e,d){d.pointer.hide();d.closed()},document:document},_create:function(){var e,d;this.content=c('&lt;div class=&quot;wp-pointer-content&quot;&gt;&lt;/div&gt;');this.arrow=c('&lt;div class=&quot;wp-pointer-arrow&quot;&gt;&lt;div class=&quot;wp-pointer-arrow-inner&quot;&gt;&lt;/div&gt;&lt;/div&gt;');d=this.element.parents().add(this.element);e=&quot;absolute&quot;;if(d.filter(function(){return&quot;fixed&quot;===c(this).css(&quot;positio
 n&quot;)}).length){e=&quot;fixed&quot;}this.pointer=c(&quot;&lt;div /&gt;&quot;).append(this.content).append(this.arrow).attr(&quot;id&quot;,&quot;wp-pointer-&quot;+a++).addClass(this.options.pointerClass).css({position:e,width:this.options.pointerWidth+&quot;px&quot;,display:&quot;none&quot;}).appendTo(this.options.document.body)},_setOption:function(d,f){var g=this.options,e=this.pointer;if(d===&quot;document&quot;&amp;&amp;f!==g.document){e.detach().appendTo(f.body)}else{if(d===&quot;pointerClass&quot;){e.removeClass(g.pointerClass).addClass(f)}}c.Widget.prototype._setOption.apply(this,arguments);if(d===&quot;position&quot;){this.reposition()}else{if(d===&quot;content&quot;&amp;&amp;this.active){this.update()}}},destroy:function(){this.pointer.remove();c.Widget.prototype.destroy.call(this)},widget:function(){return this.pointer},update:function(g){var e=this,h=this.options,d=c.Deferred(),f;if(h.disabled){return}d.done(function(i){e._update(g,i)});if(typeof h.content===&qu
 ot;string&quot;){f=h.content}else{f=h.content.call(this.element[0],d.resolve,g,this._handoff())}if(f){d.resolve(f)}return d.promise()},_update:function(f,e){var d,g=this.options;if(!e){return}this.pointer.stop();this.content.html(e);d=g.buttons.call(this.element[0],f,this._handoff());if(d){d.wrap('&lt;div class=&quot;wp-pointer-buttons&quot; /&gt;').parent().appendTo(this.content)}this.reposition()},reposition:function(){var d;if(this.options.disabled){return}d=this._processPosition(this.options.position);this.pointer.css({top:0,left:0,zIndex:b++}).show().position(c.extend({of:this.element},d));this.repoint()},repoint:function(){var e=this.options,d;if(e.disabled){return}d=(typeof e.position==&quot;string&quot;)?e.position:e.position.edge;this.pointer[0].className=this.pointer[0].className.replace(/wp-pointer-[^\s'&quot;]*/,&quot;&quot;);this.pointer.addClass(&quot;wp-pointer-&quot;+d)},_processPosition:function(e){var f={top:&quot;bottom&quot;,bottom:&quot;top&quot;,left:&q
 uot;right&quot;,right:&quot;left&quot;},d;if(typeof e==&quot;string&quot;){d={edge:e+&quot;&quot;}}else{d=c.extend({},e)}if(!d.edge){return d}if(d.edge==&quot;top&quot;||d.edge==&quot;bottom&quot;){d.align=d.align||&quot;left&quot;;d.at=d.at||d.align+&quot; &quot;+f[d.edge];d.my=d.my||d.align+&quot; &quot;+d.edge}else{d.align=d.align||&quot;top&quot;;d.at=d.at||f[d.edge]+&quot; &quot;+d.align;d.my=d.my||d.edge+&quot; &quot;+d.align}return d},open:function(e){var d=this,f=this.options;if(this.active||f.disabled){return}if(this.element.is(&quot;:hidden&quot;)){return}this.update().done(function(){d._open(e)})},_open:function(e){var d=this,f=this.options;if(this.active||f.disabled){return}this.active=true;this._trigger(&quot;open&quot;,e,this._handoff());this._trigger(&quot;show&quot;,e,this._handoff({opened:function(){d._trigger(&quot;opened&quot;,e,d._handoff())}}))},close:function(e){if(!this.active||this.options.disabled){return}var d=this;this.active=false;this._trigger(&q
 uot;close&quot;,e,this._handoff());this._trigger(&quot;hide&quot;,e,this._handoff({closed:function(){d._trigger(&quot;closed&quot;,e,d._handoff())}}))},sendToTop:function(d){if(this.active){this.pointer.css(&quot;z-index&quot;,b++)}},toggle:function(d){if(this.pointer.is(&quot;:hidden&quot;)){this.open(d)}else{this.close(d)}},_handoff:function(d){return c.extend({pointer:this.pointer,element:this.element},d)}})})(jQuery);
</del><span class="cx">\ No newline at end of file
</span><ins>+(function(c){var a=0,b=9999;c.widget(&quot;wp.pointer&quot;,{options:{pointerClass:&quot;wp-pointer&quot;,pointerWidth:320,content:function(f,e,d){return c(this).text()},buttons:function(f,e){var g=(wpPointerL10n)?wpPointerL10n.dismiss:&quot;Dismiss&quot;,d=c('&lt;a class=&quot;close&quot; href=&quot;#&quot;&gt;'+g+&quot;&lt;/a&gt;&quot;);return d.bind(&quot;click.pointer&quot;,function(h){h.preventDefault();e.element.pointer(&quot;close&quot;)})},position:&quot;top&quot;,show:function(e,d){d.pointer.show();d.opened()},hide:function(e,d){d.pointer.hide();d.closed()},document:document},_create:function(){var e,d;this.content=c('&lt;div class=&quot;wp-pointer-content&quot;&gt;&lt;/div&gt;');this.arrow=c('&lt;div class=&quot;wp-pointer-arrow&quot;&gt;&lt;div class=&quot;wp-pointer-arrow-inner&quot;&gt;&lt;/div&gt;&lt;/div&gt;');d=this.element.parents().add(this.element);e=&quot;absolute&quot;;if(d.filter(function(){return&quot;fixed&quot;===c(this).css(&quot;positio
 n&quot;)}).length){e=&quot;fixed&quot;}this.pointer=c(&quot;&lt;div /&gt;&quot;).append(this.content).append(this.arrow).attr(&quot;id&quot;,&quot;wp-pointer-&quot;+a++).addClass(this.options.pointerClass).css({position:e,width:this.options.pointerWidth+&quot;px&quot;,display:&quot;none&quot;}).appendTo(this.options.document.body)},_setOption:function(d,f){var g=this.options,e=this.pointer;if(d===&quot;document&quot;&amp;&amp;f!==g.document){e.detach().appendTo(f.body)}else{if(d===&quot;pointerClass&quot;){e.removeClass(g.pointerClass).addClass(f)}}c.Widget.prototype._setOption.apply(this,arguments);if(d===&quot;position&quot;){this.reposition()}else{if(d===&quot;content&quot;&amp;&amp;this.active){this.update()}}},destroy:function(){this.pointer.remove();c.Widget.prototype.destroy.call(this)},widget:function(){return this.pointer},update:function(g){var e=this,h=this.options,d=c.Deferred(),f;if(h.disabled){return}d.done(function(i){e._update(g,i)});if(typeof h.content===&qu
 ot;string&quot;){f=h.content}else{f=h.content.call(this.element[0],d.resolve,g,this._handoff())}if(f){d.resolve(f)}return d.promise()},_update:function(f,e){var d,g=this.options;if(!e){return}this.pointer.stop();this.content.html(e);d=g.buttons.call(this.element[0],f,this._handoff());if(d){d.wrap('&lt;div class=&quot;wp-pointer-buttons&quot; /&gt;').parent().appendTo(this.content)}this.reposition()},reposition:function(){var d;if(this.options.disabled){return}d=this._processPosition(this.options.position);this.pointer.css({top:0,left:0,zIndex:b++}).show().position(c.extend({of:this.element},d));this.repoint()},repoint:function(){var e=this.options,d;if(e.disabled){return}d=(typeof e.position==&quot;string&quot;)?e.position:e.position.edge;this.pointer[0].className=this.pointer[0].className.replace(/wp-pointer-[^\s'&quot;]*/,&quot;&quot;);this.pointer.addClass(&quot;wp-pointer-&quot;+d)},_processPosition:function(e){var f={top:&quot;bottom&quot;,bottom:&quot;top&quot;,left:&q
 uot;right&quot;,right:&quot;left&quot;},d;if(typeof e==&quot;string&quot;){d={edge:e+&quot;&quot;}}else{d=c.extend({},e)}if(!d.edge){return d}if(d.edge==&quot;top&quot;||d.edge==&quot;bottom&quot;){d.align=d.align||&quot;left&quot;;d.at=d.at||d.align+&quot; &quot;+f[d.edge];d.my=d.my||d.align+&quot; &quot;+d.edge}else{d.align=d.align||&quot;top&quot;;d.at=d.at||f[d.edge]+&quot; &quot;+d.align;d.my=d.my||d.edge+&quot; &quot;+d.align}return d},open:function(e){var d=this,f=this.options;if(this.active||f.disabled||this.element.is(&quot;:hidden&quot;)){return}this.update().done(function(){d._open(e)})},_open:function(e){var d=this,f=this.options;if(this.active||f.disabled||this.element.is(&quot;:hidden&quot;)){return}this.active=true;this._trigger(&quot;open&quot;,e,this._handoff());this._trigger(&quot;show&quot;,e,this._handoff({opened:function(){d._trigger(&quot;opened&quot;,e,d._handoff())}}))},close:function(e){if(!this.active||this.options.disabled){return}var d=this;this.a
 ctive=false;this._trigger(&quot;close&quot;,e,this._handoff());this._trigger(&quot;hide&quot;,e,this._handoff({closed:function(){d._trigger(&quot;closed&quot;,e,d._handoff())}}))},sendToTop:function(d){if(this.active){this.pointer.css(&quot;z-index&quot;,b++)}},toggle:function(d){if(this.pointer.is(&quot;:hidden&quot;)){this.open(d)}else{this.close(d)}},_handoff:function(d){return c.extend({pointer:this.pointer,element:this.element},d)}})})(jQuery);
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (19481 => 19482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2011-11-29 18:56:13 UTC (rev 19481)
+++ trunk/wp-includes/script-loader.php        2011-11-29 19:43:24 UTC (rev 19482)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">                 'broken' =&gt; __('An unidentified error has occurred.')
</span><span class="cx">         ) );
</span><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'wp-pointer', &quot;/wp-includes/js/wp-pointer$suffix.js&quot;, array( 'jquery-ui-widget', 'jquery-ui-position' ), '20111129', 1 );
</del><ins>+        $scripts-&gt;add( 'wp-pointer', &quot;/wp-includes/js/wp-pointer$suffix.js&quot;, array( 'jquery-ui-widget', 'jquery-ui-position' ), '20111129a', 1 );
</ins><span class="cx">         $scripts-&gt;localize( 'wp-pointer', 'wpPointerL10n', array(
</span><span class="cx">                 'dismiss' =&gt; __('Dismiss'),
</span><span class="cx">         ) );
</span></span></pre>
</div>
</div>

</body>
</html>