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 200059 Details for
Bug 352070
JavaScript Error after pressing page up/down in active combo box cell editor
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]
Proposed patch for v14_Maintenance branch
Bug-352070-v1.4.patch (text/plain), 7.96 KB, created by
Ivan Furnadjiev
on 2011-07-21 04:17:22 EDT
(
hide
)
Description:
Proposed patch for v14_Maintenance branch
Filename:
MIME Type:
Creator:
Ivan Furnadjiev
Created:
2011-07-21 04:17:22 EDT
Size:
7.96 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt.q07 >Index: js/qx/ui/selection/SelectionManager.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/qx/ui/selection/Attic/SelectionManager.js,v >retrieving revision 1.3 >diff -u -r1.3 SelectionManager.js >--- js/qx/ui/selection/SelectionManager.js 1 Feb 2011 14:07:40 -0000 1.3 >+++ js/qx/ui/selection/SelectionManager.js 21 Jul 2011 08:12:28 -0000 >@@ -1668,10 +1668,6 @@ > */ > getPageUp : function(vItem) > { >- var vBoundedWidget = this.getBoundedWidget(); >- var vParentScrollTop = vBoundedWidget.getScrollTop(); >- var vParentClientHeight = vBoundedWidget.getClientHeight(); >- > // Find next item > var nextItem = this.getLeadItem(); > >@@ -1679,39 +1675,44 @@ > nextItem = this.getFirst(); > } > >- // Normally we should reach the status "lead" for the >- // nextItem after two iterations. >- var tryLoops = 0; >- >- while (tryLoops < 2) >- { >- while (nextItem && (this.getItemTop(nextItem) - this.getItemHeight(nextItem) >= vParentScrollTop)) { >- nextItem = this.getUp(nextItem); >- } >- >- // This should never occour after the fix above >- if (nextItem == null) { >- break; >- } >+ var vBoundedWidget = this.getBoundedWidget(); >+ if( vBoundedWidget.isCreated() ) { >+ var vParentScrollTop = vBoundedWidget.getScrollTop(); >+ var vParentClientHeight = vBoundedWidget.getClientHeight(); >+ // Normally we should reach the status "lead" for the >+ // nextItem after two iterations. >+ var tryLoops = 0; > >- // If the nextItem is not anymore the leadItem >- // Means: There has occured a change. >- // We break here. This is normally the second step. >- if (nextItem != this.getLeadItem()) >+ while (tryLoops < 2) > { >- // be sure that the top is reached >- this.scrollItemIntoView(nextItem, true); >- break; >- } >+ while (nextItem && (this.getItemTop(nextItem) - this.getItemHeight(nextItem) >= vParentScrollTop)) { >+ nextItem = this.getUp(nextItem); >+ } >+ >+ // This should never occour after the fix above >+ if (nextItem == null) { >+ break; >+ } >+ >+ // If the nextItem is not anymore the leadItem >+ // Means: There has occured a change. >+ // We break here. This is normally the second step. >+ if (nextItem != this.getLeadItem()) >+ { >+ // be sure that the top is reached >+ this.scrollItemIntoView(nextItem, true); >+ break; >+ } > >- // Update scrolling (this is normally the first step) >- vBoundedWidget.setScrollTop(vParentScrollTop - vParentClientHeight - this.getItemHeight(nextItem)); >+ // Update scrolling (this is normally the first step) >+ vBoundedWidget.setScrollTop(vParentScrollTop - vParentClientHeight - this.getItemHeight(nextItem)); > >- // Use the real applied value instead of the calulated above >- vParentScrollTop = vBoundedWidget.getScrollTop(); >+ // Use the real applied value instead of the calulated above >+ vParentScrollTop = vBoundedWidget.getScrollTop(); > >- // Increment counter >- tryLoops++; >+ // Increment counter >+ tryLoops++; >+ } > } > > return nextItem; >@@ -1729,48 +1730,50 @@ > */ > getPageDown : function(vItem) > { >- var vBoundedWidget = this.getBoundedWidget(); >- var vParentScrollTop = vBoundedWidget.getScrollTop(); >- var vParentClientHeight = vBoundedWidget.getClientHeight(); >- > // Find next item > var nextItem = this.getLeadItem(); > > if (!nextItem) { > nextItem = this.getFirst(); > } >+ >+ var vBoundedWidget = this.getBoundedWidget(); >+ if( vBoundedWidget.isCreated() ) { >+ var vParentScrollTop = vBoundedWidget.getScrollTop(); >+ var vParentClientHeight = vBoundedWidget.getClientHeight(); >+ >+ // Normally we should reach the status "lead" for the >+ // nextItem after two iterations. >+ var tryLoops = 0; > >- // Normally we should reach the status "lead" for the >- // nextItem after two iterations. >- var tryLoops = 0; >- >- while (tryLoops < 2) >- { >- // Find next >- while (nextItem && ((this.getItemTop(nextItem) + (2 * this.getItemHeight(nextItem))) <= (vParentScrollTop + vParentClientHeight))) { >- nextItem = this.getDown(nextItem); >- } >- >- // This should never occour after the fix above >- if (nextItem == null) { >- break; >- } >- >- // If the nextItem is not anymore the leadItem >- // Means: There has occured a change. >- // We break here. This is normally the second step. >- if (nextItem != this.getLeadItem()) { >- break; >- } >+ while (tryLoops < 2) >+ { >+ // Find next >+ while (nextItem && ((this.getItemTop(nextItem) + (2 * this.getItemHeight(nextItem))) <= (vParentScrollTop + vParentClientHeight))) { >+ nextItem = this.getDown(nextItem); >+ } >+ >+ // This should never occour after the fix above >+ if (nextItem == null) { >+ break; >+ } >+ >+ // If the nextItem is not anymore the leadItem >+ // Means: There has occured a change. >+ // We break here. This is normally the second step. >+ if (nextItem != this.getLeadItem()) { >+ break; >+ } > >- // Update scrolling (this is normally the first step) >- vBoundedWidget.setScrollTop(vParentScrollTop + vParentClientHeight - 2 * this.getItemHeight(nextItem)); >+ // Update scrolling (this is normally the first step) >+ vBoundedWidget.setScrollTop(vParentScrollTop + vParentClientHeight - 2 * this.getItemHeight(nextItem)); > >- // Use the real applied value instead of the calulated above >- vParentScrollTop = vBoundedWidget.getScrollTop(); >+ // Use the real applied value instead of the calulated above >+ vParentScrollTop = vBoundedWidget.getScrollTop(); > >- // Increment counter >- tryLoops++; >+ // Increment counter >+ tryLoops++; >+ } > } > > return nextItem; >#P org.eclipse.rap.rwt.q07.jstest >Index: js/org/eclipse/rwt/test/tests/ComboTest.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt.test/org.eclipse.rap.rwt.q07.jstest/js/org/eclipse/rwt/test/tests/ComboTest.js,v >retrieving revision 1.11.2.1 >diff -u -r1.11.2.1 ComboTest.js >--- js/org/eclipse/rwt/test/tests/ComboTest.js 18 May 2011 08:27:04 -0000 1.11.2.1 >+++ js/org/eclipse/rwt/test/tests/ComboTest.js 21 Jul 2011 08:12:29 -0000 >@@ -206,6 +206,30 @@ > combo.destroy(); > }, > >+ testPageUpOnNotCreatedList : function() { >+ var testUtil = org.eclipse.rwt.test.fixture.TestUtil; >+ var combo = this._createDefaultCombo(); >+ combo.setEditable( true ); >+ combo.select( 3 ); >+ testUtil.flush(); >+ combo.focus(); >+ testUtil.keyDown( combo._field.getElement(), "PageUp" ); >+ assertEquals( "Ruby", combo._list.getSelectedItems()[ 0 ].getLabel() ); >+ combo.destroy(); >+ }, >+ >+ testPageDownOnNotCreatedList : function() { >+ var testUtil = org.eclipse.rwt.test.fixture.TestUtil; >+ var combo = this._createDefaultCombo(); >+ combo.setEditable( true ); >+ combo.select( 3 ); >+ testUtil.flush(); >+ combo.focus(); >+ testUtil.keyDown( combo._field.getElement(), "PageDown" ); >+ assertEquals( "Ruby", combo._list.getSelectedItems()[ 0 ].getLabel() ); >+ combo.destroy(); >+ }, >+ > ////////// > // Helpers >
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
Flags:
ivan
:
review?
Actions:
View
|
Diff
Attachments on
bug 352070
:
199653
|
199980
| 200059