Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Prevent selection change in Table on Alt+ARROW_UP & Alt+ARROW_DOWN
Prevent selection change in Table on Alt+ARROW_UP & Alt+ARROW_DOWN [message #1753748] Thu, 09 February 2017 10:10
Eclipse UserFriend
Hi
we are using a custom-made combobox, initially based on TableCombo.java, The reason for this is, that we needed a multicolumn dropdown list.
This works fine so far.
There is just one small detail, which I can only fix in RAP-Client and I would like your opinion if this fix could be made a part of the regular code. Otherwise we will try to use a mix-in for the code changes.

The Combobox should drop down/up on Alt+ARROW_DOWN and Alt+ARROW_UP.
The Problem: Due to the key handler in Grid.js, which does not take the state of the Alt key into account, When the combobox is dropped down, the Table control in the popup has the focus and Alt+ARROW_UP will first be seen by the Table and change the selection before our Java code closes the Combobox.

I tried the following fix in Grid.js:
_handleKeyUp : function( event ) {
if (event._valueDomEvent.altKey) return;
var item = this._focusItem.getPreviousItem();
if( item != null ) {
var itemIndex = item.getFlatIndex();
this._handleKeyboardSelect( event, item, itemIndex );
}
},

This works.

Is there a better way to resolve this?
I do not know how a Table in SWT would behave in this case and therefore am unsure if this is a bug or not.

Kind regards,
Gunnar

Previous Topic:ServerPushSession and XML parsing error in Firefox
Next Topic:Snippit wanted: Inline editing with Nebula GridViewer
Goto Forum:
  


Current Time: Tue Jul 08 21:25:33 EDT 2025

Powered by FUDForum. Page generated in 0.30419 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top