tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkuhn...@apache.org
Subject svn commit: r591367 - /tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/widget/TimePicker.js
Date Fri, 02 Nov 2007 15:36:36 GMT
Author: jkuhnert
Date: Fri Nov  2 08:36:35 2007
New Revision: 591367

URL: http://svn.apache.org/viewvc?rev=591367&view=rev
Log:
Made TimePicker work "better" in safari by working around a mouseout target safari specific
bug.

Modified:
    tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/widget/TimePicker.js

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/widget/TimePicker.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/widget/TimePicker.js?rev=591367&r1=591366&r2=591367&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/widget/TimePicker.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/widget/TimePicker.js Fri Nov
 2 08:36:35 2007
@@ -95,11 +95,19 @@
     },
 
     onOptionMouseOver: function(evt) {
-        this._selectOption(evt.target);
+        var target = evt.target;
+        if (target.nodeType == 3){ // get around safari bug
+            target = target.parentNode;
+        }
+        this._selectOption(target);
     },
 
     onOptionMouseOut: function(evt) {
-        this._clearOptionSelection(evt.target);
+        var target = evt.target;
+        if (target.nodeType == 3){ // get around safari bug
+            target = target.parentNode;
+        }
+        this._clearOptionSelection(target);
     },
 
     onChange:function() {},
@@ -121,10 +129,6 @@
         }
 
         this.show();
-
-        if (this.selectedNode){
-            this.selectedNode.scrollIntoView(true);
-        }
     },
 
     onInputBlur: function(evt) {
@@ -235,6 +239,10 @@
         this.hasFocus=true;
         this.preventBlur=true;
         tapestry.widget.currentTimePicker=this;
+
+        if (this.selectedNode){
+            this.selectedNode.scrollIntoView(true);
+        }
     },
 
     getValue:function(){



Mime
View raw message