Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 404384

Summary: [Menu] Trigger mnemonics causes JS error
Product: [RT] RAP Reporter: Fabian Henniges <eclipse>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: tbuschto
Version: 2.1   
Target Milestone: 2.1 M2   
Hardware: All   
OS: All   
Whiteboard:

Description Fabian Henniges CLA 2013-03-26 12:43:03 EDT
Choosing a menu item using CTRL+ALT and accelerator causes JS error. 
Only some items are affected. There are no obvious differences in API usage.


Javascript error occurred:

Error: TypeError: Object [object Object] has no method 'handleMnemonic'

  stack: TypeError: Object [object Object] has no method 'handleMnemonic'
    at rwt.qx.Class.define.members._onKeyDown (http://127.0.0.1:10080/rwt-resources/rap-client.js:45178:23)
    at rwt.qx.Class.define.members._dispatchEvent (http://127.0.0.1:10080/rwt-resources/rap-client.js:6260:18)
    at rwt.qx.Class.define.members.dispatchEvent (http://127.0.0.1:10080/rwt-resources/rap-client.js:6190:12)
    at Object.rwt.qx.Class.define.statics._processKeyEvent (http://127.0.0.1:10080/rwt-resources/rap-client.js:17102:17)
    at Object.rwt.qx.Class.define.statics._onkeyevent_post (http://127.0.0.1:10080/rwt-resources/rap-client.js:17059:14)
    at Object.rwt.qx.Class.define.statics._onKeyEvent (http://127.0.0.1:10080/rwt-resources/rap-client.js:17039:16)
    at HTMLBodyElement.wrap (http://127.0.0.1:10080/rwt-resources/rap-client.js:5718:25)
  Stack: TypeError: Object [object Object] has no method 'handleMnemonic'
    at rwt.qx.Class.define.members._onKeyDown (http://127.0.0.1:10080/rwt-resources/rap-client.js:45178:23)
    at rwt.qx.Class.define.members._dispatchEvent (http://127.0.0.1:10080/rwt-resources/rap-client.js:6260:18)
    at rwt.qx.Class.define.members.dispatchEvent (http://127.0.0.1:10080/rwt-resources/rap-client.js:6190:12)
    at Object.rwt.qx.Class.define.statics._processKeyEvent (http://127.0.0.1:10080/rwt-resources/rap-client.js:17102:17)
    at Object.rwt.qx.Class.define.statics._onkeyevent_post (http://127.0.0.1:10080/rwt-resources/rap-client.js:17059:14)
    at Object.rwt.qx.Class.define.statics._onKeyEvent (http://127.0.0.1:10080/rwt-resources/rap-client.js:17039:16)
    at HTMLBodyElement.wrap (http://127.0.0.1:10080/rwt-resources/rap-client.js:5718:25)
  Debug: on
Comment 1 Tim Buschtoens CLA 2013-03-27 07:15:01 EDT
It looks like to me that this is actually mnemonics related, not accelerator. Do you use mnemonics with CTRL+ALT to activate them? If yes, I might have an idea what causes this: MenuItems with SEPARATOR style flag. Do you use them?
Comment 2 Fabian Henniges CLA 2013-03-27 07:52:27 EDT
Thanks for your fast reply Tim. 
To confirm your idea I changed from SWT.SEPARATOR to SWT.PUSH. 
This lead to cluttered menus obviously but resolved the problem.
Comment 3 Ivan Furnadjiev CLA 2013-04-03 04:46:40 EDT
Fixed with commit c3379c032a635a40c930e98288a3e6d7a98bed49.