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 234114 Details for
Bug 413174
Mnemonic collision between button and menu
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.1
Prevent-MnemonicHandler-from-triggering-multiple-wid.patch (text/plain), 1.73 KB, created by
Tim Buschtoens
on 2013-08-06 08:59:35 EDT
(
hide
)
Description:
patch for 2.1
Filename:
MIME Type:
Creator:
Tim Buschtoens
Created:
2013-08-06 08:59:35 EDT
Size:
1.73 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt >diff --git js/rwt/widgets/util/MnemonicHandler.js js/rwt/widgets/util/MnemonicHandler.js >index 31d1395..3b6fce7 100644 >--- js/rwt/widgets/util/MnemonicHandler.js >+++ js/rwt/widgets/util/MnemonicHandler.js >@@ -117,6 +117,9 @@ > if( !onlyVisible || entry[ 0 ].isSeeable() ) { > try{ > entry[ 1 ].call( entry[ 0 ], event ); >+ if( event.success ) { >+ break; >+ } > } catch( ex ) { > var msg = "Could not handle mnemonic " + event.type + ". "; > if( entry[ 0 ].isDisposed() ) { >#P org.eclipse.rap.rwt.jstest >diff --git js/org/eclipse/rwt/test/tests/MnemonicHandlerTest.js js/org/eclipse/rwt/test/tests/MnemonicHandlerTest.js >index 7280f77..6931b9d 100644 >--- js/org/eclipse/rwt/test/tests/MnemonicHandlerTest.js >+++ js/org/eclipse/rwt/test/tests/MnemonicHandlerTest.js >@@ -230,6 +230,27 @@ > > TestUtil.keyDown( widget, "B", DomEvent.CTRL_MASK ); > assertEquals( 0, TestUtil.getRequestsSend() ); >+ }, >+ >+ testFireTrigger_successStopsTriggerEvent : function() { >+ handler.setActivator( "CTRL" ); >+ success = true; >+ widget.focus(); >+ var widgetTwo = TestUtil.createWidgetByProtocol( "w4", "w2" ); >+ TestUtil.flush(); >+ var secondLog = []; >+ handler.add( widgetTwo, function( event ) { >+ if( event.type === "trigger" ) { >+ secondLog.push( event ); >+ event.success = true; >+ } >+ } ); >+ >+ TestUtil.keyDown( shell, "Control", DomEvent.CTRL_MASK ); >+ TestUtil.keyDown( widget, "B", DomEvent.CTRL_MASK ); >+ >+ var totalSuccess = charLog.length + secondLog.length; >+ assertEquals( 1, totalSuccess ); > } > > }
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:
tbuschto
:
review?
Actions:
View
|
Diff
Attachments on
bug 413174
:
233558
| 234114