Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 239831 Details for
Bug 427828
[Text] Loses focus on click in IE8
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch for 2.2-maintenance branch
bug-427828-fix-for-2.2-maintenance.patch (text/plain), 6.67 KB, created by
Ivan Furnadjiev
on 2014-02-11 11:28:01 EST
(
hide
)
Description:
Patch for 2.2-maintenance branch
Filename:
MIME Type:
Creator:
Ivan Furnadjiev
Created:
2014-02-11 11:28:01 EST
Size:
6.67 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/Text.js b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/Text.js >index bd92505..9596b25 100644 >--- a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/Text.js >+++ b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/Text.js >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2010, 2013 EclipseSource and others. >+ * Copyright (c) 2010, 2014 EclipseSource and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -9,7 +9,7 @@ > * EclipseSource - initial API and implementation > ******************************************************************************/ > >-(function(){ >+(function() { > > rwt.qx.Class.define( "rwt.widgets.Text", { > >@@ -67,7 +67,7 @@ > > setPasswordMode : function( value ) { > var type = value ? "password" : "text"; >- if( this._inputTag != "textarea" && this._inputType != type ) { >+ if( !this._isTextArea() && this._inputType != type ) { > this._inputType = type; > if( this._isCreated ) { > if( rwt.client.Client.getEngine() === "mshtml" ) { >@@ -186,12 +186,16 @@ > > _applyElement : function( value, oldValue ) { > this.base( arguments, value, oldValue ); >- if( this._inputTag == "textarea" ) { >+ if( this._isTextArea() ) { > this._styleWrap(); >- if( rwt.client.Client.isNewMshtml() && rwt.client.Client.getVersion() === 9 ) { >- // Bug 422974 - [Text] Multi-Line Text with border-radius not focusable by mouse in IE9 >- rwt.html.Style.setBackgroundImage( this._inputElement, "static/image/blank.gif" ); >- } >+ } >+ var client = rwt.client.Client; >+ if( client.isMshtml() >+ || client.isNewMshtml() && client.getVersion() === 9 && this._isTextArea() ) >+ { >+ // Bug 427828 - [Text] Loses focus on click in IE8 >+ // Bug 422974 - [Text] Multi-Line Text with border-radius not focusable by mouse in IE9 >+ rwt.html.Style.setBackgroundImage( this._inputElement, "static/image/blank.gif" ); > } > // Fix for bug 306354 > this._inputElement.style.paddingRight = "1px"; >@@ -200,13 +204,13 @@ > }, > > _webkitMultilineFix : function() { >- if( this._inputTag !== "textarea" ) { >+ if( !this._isTextArea() ) { > this.base( arguments ); > } > }, > > _applyWrap : function( value, oldValue ) { >- if( this._inputTag == "textarea" ) { >+ if( this._isTextArea() ) { > this._styleWrap(); > } > }, >@@ -234,7 +238,7 @@ > } ), > > _applyMaxLength : function( value, oldValue ) { >- if( this._inputTag != "textarea" ) { >+ if( !this._isTextArea() ) { > this.base( arguments, value, oldValue ); > } > }, >@@ -268,6 +272,10 @@ > if( fireEvents ) { > this._oninputDom( event ); > } >+ }, >+ >+ _isTextArea : function() { >+ return this._inputTag === "textarea"; > }, > > //////////////// >@@ -463,7 +471,7 @@ > > // Overwritten > _preventEnter : function( event ) { >- if( this._inputTag !== "textarea" ) { >+ if( !this._isTextArea() ) { > this.base( arguments, event ); > } > }, >@@ -504,7 +512,7 @@ > - this._getIconOuterWidth( "cancel" ); > style.width = Math.max( 0, width ) + "px"; > var messageHeight = parseInt( style.height, 10 ); >- if( this._inputTag == "textarea" ) { >+ if( this._isTextArea() ) { > // The text-area padding is hard codded in the appearances > style.top = "0px"; > style.left = "3px"; >@@ -550,5 +558,5 @@ > > } ); > >-}()); >+}() ); > >diff --git a/tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/TextTest.js b/tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/TextTest.js >index b1593dd..7d95285 100644 >--- a/tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/TextTest.js >+++ b/tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/TextTest.js >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2010, 2013 EclipseSource and others. >+ * Copyright (c) 2010, 2014 EclipseSource and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -9,7 +9,7 @@ > * EclipseSource - initial API and implementation > ******************************************************************************/ > >-(function(){ >+(function() { > > var TestUtil = org.eclipse.rwt.test.fixture.TestUtil; > var Processor = rwt.remote.MessageProcessor; >@@ -388,7 +388,7 @@ > }, > > testRenderPaddingWithRoundedBorder : function() { >- if( !rwt.client.Client.supportsCss3() ) { >+ if( !Client.supportsCss3() ) { > createText(); > text.setPadding( 3 ); > text.setBorder( new Border( 1, "rounded", "black", 0 ) ); >@@ -1399,12 +1399,12 @@ > TestUtil.flush(); > > var textHeight= text.getInputElement().offsetHeight; >- if( rwt.client.Client.isMshtml() ) { >+ if( Client.isMshtml() ) { > textHeight -= 2; > } > var expected = Math.floor( 100 / 2 - textHeight / 2 - 1 ); > assertEquals( expected, parseInt( text.getElement().style.paddingTop, 10 ) ); >- if( rwt.client.Client.isNewMshtml() ) { >+ if( Client.isNewMshtml() ) { > assertEquals( "top", text._inputElement.style.verticalAlign ); > } else { > assertEquals( "", text._inputElement.style.verticalAlign ); >@@ -1432,8 +1432,10 @@ > > var element = text._getTargetNode().firstChild; > var image = TestUtil.getCssBackgroundImage( element ); >+ >+ // Bug 427828 - [Text] Loses focus on click in IE8 > // Bug 422974 - [Text] Multi-Line Text with border-radius not focusable by mouse in IE9 >- var expected = rwt.client.Client.isNewMshtml() && rwt.client.Client.getVersion() === 9; >+ var expected = Client.isMshtml() || Client.isNewMshtml() && Client.getVersion() === 9; > assertEquals( expected, image.indexOf( "blank.gif" ) !== -1 ); > }, > >@@ -1442,7 +1444,10 @@ > > var element = text._getTargetNode().firstChild; > var image = TestUtil.getCssBackgroundImage( element ); >- assertTrue( image.indexOf( "blank.gif" ) === -1 ); >+ >+ // Bug 427828 - [Text] Loses focus on click in IE8 >+ var expected = Client.isMshtml(); >+ assertEquals( expected, image.indexOf( "blank.gif" ) !== -1 ); > }, > > ///////// >@@ -1511,4 +1516,4 @@ > text._setSelectionLength( selection[ 1 ] - selection[ 0 ] ); > }; > >-}()); >+}() );
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 427828
:
239791
|
239792
| 239831