|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2010, 2013 EclipseSource and others. |
2 |
* Copyright (c) 2010, 2014 EclipseSource and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 9-15
Link Here
|
| 9 |
* EclipseSource - initial API and implementation |
9 |
* EclipseSource - initial API and implementation |
| 10 |
******************************************************************************/ |
10 |
******************************************************************************/ |
| 11 |
|
11 |
|
| 12 |
(function(){ |
12 |
(function() { |
| 13 |
|
13 |
|
| 14 |
rwt.qx.Class.define( "rwt.widgets.Text", { |
14 |
rwt.qx.Class.define( "rwt.widgets.Text", { |
| 15 |
|
15 |
|
|
Lines 67-73
Link Here
|
| 67 |
|
67 |
|
| 68 |
setPasswordMode : function( value ) { |
68 |
setPasswordMode : function( value ) { |
| 69 |
var type = value ? "password" : "text"; |
69 |
var type = value ? "password" : "text"; |
| 70 |
if( this._inputTag != "textarea" && this._inputType != type ) { |
70 |
if( !this._isTextArea() && this._inputType != type ) { |
| 71 |
this._inputType = type; |
71 |
this._inputType = type; |
| 72 |
if( this._isCreated ) { |
72 |
if( this._isCreated ) { |
| 73 |
if( rwt.client.Client.getEngine() === "mshtml" ) { |
73 |
if( rwt.client.Client.getEngine() === "mshtml" ) { |
|
Lines 186-197
Link Here
|
| 186 |
|
186 |
|
| 187 |
_applyElement : function( value, oldValue ) { |
187 |
_applyElement : function( value, oldValue ) { |
| 188 |
this.base( arguments, value, oldValue ); |
188 |
this.base( arguments, value, oldValue ); |
| 189 |
if( this._inputTag == "textarea" ) { |
189 |
if( this._isTextArea() ) { |
| 190 |
this._styleWrap(); |
190 |
this._styleWrap(); |
| 191 |
if( rwt.client.Client.isNewMshtml() && rwt.client.Client.getVersion() === 9 ) { |
191 |
} |
| 192 |
// Bug 422974 - [Text] Multi-Line Text with border-radius not focusable by mouse in IE9 |
192 |
var client = rwt.client.Client; |
| 193 |
rwt.html.Style.setBackgroundImage( this._inputElement, "static/image/blank.gif" ); |
193 |
if( client.isMshtml() |
| 194 |
} |
194 |
|| client.isNewMshtml() && client.getVersion() === 9 && this._isTextArea() ) |
|
|
195 |
{ |
| 196 |
// Bug 427828 - [Text] Loses focus on click in IE8 |
| 197 |
// Bug 422974 - [Text] Multi-Line Text with border-radius not focusable by mouse in IE9 |
| 198 |
rwt.html.Style.setBackgroundImage( this._inputElement, "static/image/blank.gif" ); |
| 195 |
} |
199 |
} |
| 196 |
// Fix for bug 306354 |
200 |
// Fix for bug 306354 |
| 197 |
this._inputElement.style.paddingRight = "1px"; |
201 |
this._inputElement.style.paddingRight = "1px"; |
|
Lines 200-212
Link Here
|
| 200 |
}, |
204 |
}, |
| 201 |
|
205 |
|
| 202 |
_webkitMultilineFix : function() { |
206 |
_webkitMultilineFix : function() { |
| 203 |
if( this._inputTag !== "textarea" ) { |
207 |
if( !this._isTextArea() ) { |
| 204 |
this.base( arguments ); |
208 |
this.base( arguments ); |
| 205 |
} |
209 |
} |
| 206 |
}, |
210 |
}, |
| 207 |
|
211 |
|
| 208 |
_applyWrap : function( value, oldValue ) { |
212 |
_applyWrap : function( value, oldValue ) { |
| 209 |
if( this._inputTag == "textarea" ) { |
213 |
if( this._isTextArea() ) { |
| 210 |
this._styleWrap(); |
214 |
this._styleWrap(); |
| 211 |
} |
215 |
} |
| 212 |
}, |
216 |
}, |
|
Lines 234-240
Link Here
|
| 234 |
} ), |
238 |
} ), |
| 235 |
|
239 |
|
| 236 |
_applyMaxLength : function( value, oldValue ) { |
240 |
_applyMaxLength : function( value, oldValue ) { |
| 237 |
if( this._inputTag != "textarea" ) { |
241 |
if( !this._isTextArea() ) { |
| 238 |
this.base( arguments, value, oldValue ); |
242 |
this.base( arguments, value, oldValue ); |
| 239 |
} |
243 |
} |
| 240 |
}, |
244 |
}, |
|
Lines 268-273
Link Here
|
| 268 |
if( fireEvents ) { |
272 |
if( fireEvents ) { |
| 269 |
this._oninputDom( event ); |
273 |
this._oninputDom( event ); |
| 270 |
} |
274 |
} |
|
|
275 |
}, |
| 276 |
|
| 277 |
_isTextArea : function() { |
| 278 |
return this._inputTag === "textarea"; |
| 271 |
}, |
279 |
}, |
| 272 |
|
280 |
|
| 273 |
//////////////// |
281 |
//////////////// |
|
Lines 463-469
Link Here
|
| 463 |
|
471 |
|
| 464 |
// Overwritten |
472 |
// Overwritten |
| 465 |
_preventEnter : function( event ) { |
473 |
_preventEnter : function( event ) { |
| 466 |
if( this._inputTag !== "textarea" ) { |
474 |
if( !this._isTextArea() ) { |
| 467 |
this.base( arguments, event ); |
475 |
this.base( arguments, event ); |
| 468 |
} |
476 |
} |
| 469 |
}, |
477 |
}, |
|
Lines 504-510
Link Here
|
| 504 |
- this._getIconOuterWidth( "cancel" ); |
512 |
- this._getIconOuterWidth( "cancel" ); |
| 505 |
style.width = Math.max( 0, width ) + "px"; |
513 |
style.width = Math.max( 0, width ) + "px"; |
| 506 |
var messageHeight = parseInt( style.height, 10 ); |
514 |
var messageHeight = parseInt( style.height, 10 ); |
| 507 |
if( this._inputTag == "textarea" ) { |
515 |
if( this._isTextArea() ) { |
| 508 |
// The text-area padding is hard codded in the appearances |
516 |
// The text-area padding is hard codded in the appearances |
| 509 |
style.top = "0px"; |
517 |
style.top = "0px"; |
| 510 |
style.left = "3px"; |
518 |
style.left = "3px"; |
|
Lines 550-554
Link Here
|
| 550 |
|
558 |
|
| 551 |
} ); |
559 |
} ); |
| 552 |
|
560 |
|
| 553 |
}()); |
561 |
}() ); |
| 554 |
|
562 |
|