Skip to content
This repository
Browse code

effects.js and controls.js fixes

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4053 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 77c8e3a0fd32e736575edce503b2e9f891193f9e 1 parent 6665375
Thomas Fuchs authored March 26, 2006
4  actionpack/lib/action_view/helpers/javascripts/controls.js
@@ -141,8 +141,8 @@ Autocompleter.Base.prototype = {
141 141
          return;
142 142
       }
143 143
      else 
144  
-      if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN) 
145  
-        return;
  144
+       if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN || 
  145
+         (navigator.appVersion.indexOf('AppleWebKit') > 0 && event.keyCode == 0)) return;
146 146
 
147 147
     this.changed = true;
148 148
     this.hasFocus = true;
5  actionpack/lib/action_view/helpers/javascripts/effects.js
@@ -581,7 +581,8 @@ Effect.Puff = function(element) {
581 581
       beforeSetupInternal: function(effect) {
582 582
         effect.effects[0].element.setStyle({position: 'absolute'}); },
583 583
       afterFinishInternal: function(effect) {
584  
-         effect.effects[0].element.hide().setStyle(oldStyle); }
  584
+         effect.effects[0].element.hide();
  585
+         effect.effects[0].element.setStyle(oldStyle); }
585 586
      }, arguments[1] || {})
586 587
    );
587 588
 }
@@ -640,7 +641,7 @@ Effect.SwitchOff = function(element) {
640 641
         afterFinishInternal: function(effect) {
641 642
           effect.element.hide();
642 643
           effect.element.undoClipping();
643  
-          effect.element.undoPositionend();
  644
+          effect.element.undoPositioned();
644 645
           effect.element.setStyle({opacity: oldOpacity});
645 646
         }
646 647
       })
4  railties/html/javascripts/controls.js
@@ -141,8 +141,8 @@ Autocompleter.Base.prototype = {
141 141
          return;
142 142
       }
143 143
      else 
144  
-      if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN) 
145  
-        return;
  144
+       if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN || 
  145
+         (navigator.appVersion.indexOf('AppleWebKit') > 0 && event.keyCode == 0)) return;
146 146
 
147 147
     this.changed = true;
148 148
     this.hasFocus = true;
5  railties/html/javascripts/effects.js
@@ -581,7 +581,8 @@ Effect.Puff = function(element) {
581 581
       beforeSetupInternal: function(effect) {
582 582
         effect.effects[0].element.setStyle({position: 'absolute'}); },
583 583
       afterFinishInternal: function(effect) {
584  
-         effect.effects[0].element.hide().setStyle(oldStyle); }
  584
+         effect.effects[0].element.hide();
  585
+         effect.effects[0].element.setStyle(oldStyle); }
585 586
      }, arguments[1] || {})
586 587
    );
587 588
 }
@@ -640,7 +641,7 @@ Effect.SwitchOff = function(element) {
640 641
         afterFinishInternal: function(effect) {
641 642
           effect.element.hide();
642 643
           effect.element.undoClipping();
643  
-          effect.element.undoPositionend();
  644
+          effect.element.undoPositioned();
644 645
           effect.element.setStyle({opacity: oldOpacity});
645 646
         }
646 647
       })

0 notes on commit 77c8e3a

Please sign in to comment.
Something went wrong with that request. Please try again.