[jquery-ui] r3417 committed - button: set title-attribute (not tooltip...), apply tooltip plugin to ...

38 views
Skip to first unread message

codesite...@google.com

unread,
Nov 7, 2009, 6:06:14 AM11/7/09
to jquery...@googlegroups.com
Revision: 3417
Author: joern.zaefferer
Date: Sat Nov 7 03:05:27 2009
Log: button: set title-attribute (not tooltip...), apply tooltip plugin to
all buttons; tooltip: hotfix for fade animation queue issues
http://code.google.com/p/jquery-ui/source/detail?r=3417

Modified:
/branches/dev/tests/visual/button/default.html
/branches/dev/ui/jquery.ui.button.js
/branches/dev/ui/jquery.ui.tooltip.js

=======================================
--- /branches/dev/tests/visual/button/default.html Thu Oct 1 13:53:32 2009
+++ /branches/dev/tests/visual/button/default.html Sat Nov 7 03:05:27 2009
@@ -8,6 +8,8 @@
<script type="text/javascript"
src="../../../external/jquery.metadata.js"></script>
<script type="text/javascript"
src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript"
src="../../../ui/jquery.ui.button.js"></script>
+ <script type="text/javascript"
src="../../../ui/jquery.ui.position.js"></script>
+ <script type="text/javascript"
src="../../../ui/jquery.ui.tooltip.js"></script>
<script type="text/javascript">
$(function() {
var selection = $("#push button, #ops1, #ops2, #format, #radio, #mode,
#toggle");
@@ -26,6 +28,8 @@
}, function() {
selection.buttons("destroy");
}).click();
+
+ $("button").tooltip();
});
</script>
<style>
=======================================
--- /branches/dev/ui/jquery.ui.button.js Thu Oct 15 03:05:53 2009
+++ /branches/dev/ui/jquery.ui.button.js Sat Nov 7 03:05:27 2009
@@ -88,8 +88,8 @@
this.element

.addClass(multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only")
.removeClass("ui-button-text-icons ui-button-text-icon");
- if (!this.element.attr("tooltip")) {
- this.element.attr("tooltip",
this.element.find(".ui-button-text").text());
+ if (!this.element.attr("title")) {
+ this.element.attr("title",
this.element.find(".ui-button-text").text());
}
}
} else {
=======================================
--- /branches/dev/ui/jquery.ui.tooltip.js Thu Oct 15 03:05:53 2009
+++ /branches/dev/ui/jquery.ui.tooltip.js Sat Nov 7 03:05:27 2009
@@ -68,7 +68,7 @@
if (this.tooltip.is(":animated"))
this.tooltip.stop().show().fadeTo("normal", this.opacity);
else
- this.tooltip.is(':visible') ? this.tooltip.fadeTo("normal",
this.opacity) : this.tooltip.fadeIn();
+ this.tooltip.is(':visible') ? this.tooltip.show().fadeTo("normal",
this.opacity) : this.tooltip.fadeIn();
},

close: function() {
@@ -79,7 +79,9 @@
this.tooltip.attr("aria-hidden", "true");

if (this.tooltip.is(':animated'))
- this.tooltip.stop().fadeTo("normal", 0);
+ this.tooltip.stop().fadeTo("normal", 0, function() {
+ $(this).hide();
+ });
else
this.tooltip.stop().fadeOut();

Todd Parker

unread,
Nov 7, 2009, 8:23:25 AM11/7/09
to jquery...@googlegroups.com
Glad you added tooltips to the button test page. I'm still seeing some situations where the tooltip fails to open as you continue to use it. If you hover over the first 3 icon buttons (open, save, delete), you will see tooltips the first time, but as you continue to mouse on and off them and other toolbar icons, they fail to appear (sometimes). In FF3/Mac, the save one stops working and the open one sails somewhat frequently while the delete always works (I now, it's weird). I'm not moving around fast at all, this happens when slowing mousing around like a normal person.




todd.parker  .: .   filament group inc.  
102 south street #3 boston, ma 02111  

phone + 617.482.7120 
fax     + 617.687.0212
web     + filamentgroup.com


Jörn Zaefferer

unread,
Nov 7, 2009, 8:25:45 AM11/7/09
to jquery...@googlegroups.com
Yeah, thats caused by the fading animation queue. Thats really annoying, I though I had it figured out.. Each element has its own tooltip element here, so I probably need a different approach.

Let me know if you can find a way to reproduce a failure, that would help a lot. That is, an actual deterministic behaviour...

Jörn

Todd Parker

unread,
Nov 7, 2009, 8:45:46 AM11/7/09
to jquery...@googlegroups.com
The best I can say is that if you hover from one of these icon buttons to another fast enough that the one you're on doesn't close before the next opens, it will permanently kill the tooltip from showing again until you re-load. If you just hover back and forth quickly twice or three times over the 3 icon buttons (open, save delete), you can kill the tooltips on all 3. So it's not random, there is something with the timing of the animations that breaks things just like you said. Sorry I don't have better info, it just happens so fast!
Reply all
Reply to author
Forward
0 new messages