Roo/bootstrap/Input.js
authorAlan Knowles <alan@roojs.com>
Thu, 15 May 2014 07:36:29 +0000 (15:36 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 15 May 2014 07:36:29 +0000 (15:36 +0800)
Roo/bootstrap/Input.js

index 17129e2..c9ea5df 100644 (file)
@@ -710,6 +710,27 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
             this.setValue( event.shiftKey ?  cc : cc.toLowerCase());
             
         }
+    },
+    adjustWidth : function(tag, w){
+        tag = tag.toLowerCase();
+        if(typeof w == 'number' && Roo.isStrict && !Roo.isSafari){
+            if(Roo.isIE && (tag == 'input' || tag == 'textarea')){
+                if(tag == 'input'){
+                    return w + 2;
+                }
+                if(tag == 'textarea'){
+                    return w-2;
+                }
+            }else if(Roo.isOpera){
+                if(tag == 'input'){
+                    return w + 2;
+                }
+                if(tag == 'textarea'){
+                    return w-2;
+                }
+            }
+        }
+        return w;
     }
     
 });