| Summary: | SWT.MenuDetect event is not fired in Safari | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Yury <swimmer_86> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 1.4 | ||
| Target Milestone: | 1.5 M3 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
I can confirm that too - no MenuDetect event on Sfari 5.1.1. All other browsers work fine. My tests show that sometimes we have "mouse detect" event, but most often we haven't. Somehow this is related to the context menu set. If I remove the menu (comment the line shell.setMenu(menu);) MenuDetect event works fine all the time. My observations are that EventUtil.js#menuDetectedByMouse is not called at all. This bug has been fixed with the fix for Bug 362243. |
Build Identifier: RAP 1.4 Snippet to reproduce: public int createUI() { Display display = PlatformUI.createDisplay(); Shell shell = new Shell(display); shell.setLayout( new GridLayout() ); Menu menu = new Menu(shell, SWT.POP_UP); MenuItem menuItem = new MenuItem(menu, SWT.PUSH); menuItem.setText("Action"); menuItem.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent se) { System.out.println("Action!"); } }); shell.addListener(SWT.MenuDetect, new Listener() { public void handleEvent(Event event) { System.out.println("Menu detect"); } }); shell.setMenu(menu); shell.open(); while( !shell.isDisposed() ) { try { if( !display.readAndDispatch() ) { display.sleep(); } } catch( Throwable t ) { break; } } display.dispose(); return 0; } It works fine in IE, FF, Chrome, but does not work in Safari 5.1.1. Reproducible: Always Steps to Reproduce: 1. Run the snippet. 2. Right click to open popup menu. 3. Select the menu item. Selection event is fired, but menudetect even - does not.