iDempiere modal dialog can not be closed with keyboard commands.

114 views
Skip to first unread message

reua...@gmail.com

unread,
Feb 12, 2021, 5:59:39 AM2/12/21
to iDempiere
I am not sure if that has been raised before.
The iDempiere Dialogs do not react to keyboard input (except arrow left/right I believe). Instead a mouse click is always required to close the dialog.
(tested on my own systems and on test.idempiere.org)
I am used to using the enter and escape keys to close a dialog from virtually any other desktop OS and app that I use. I wonder why this standard behavoir is not available in iDempiere?
Is there any reason that this has not been implemented in a standard way?
Thanks for any hints and  comments.

Andreas

Heng Sin Low

unread,
Feb 12, 2021, 6:08:31 AM2/12/21
to idem...@googlegroups.com
The simple answer is just that we have not implemented that yet.

Please open a feature request and perhaps others can help contribute to this.

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/8eb83b9e-6218-48b6-aa29-a873fdc7c7bcn%40googlegroups.com.

Carlos Antonio Ruiz Gomez

unread,
Feb 12, 2021, 6:08:56 AM2/12/21
to idem...@googlegroups.com
> Is there any reason that this has not been implemented in a standard way?

I suppose nobody has contributed/sponsored this effort.

Regards,

Carlos Ruiz


El 12/2/21 a las 11:59, reua...@gmail.com escribió:

reua...@gmail.com

unread,
Feb 12, 2021, 6:10:17 AM2/12/21
to iDempiere
Correction: The dialog does not seem to listen to arrow left/right keys as I wrote. Insted  tab, shift+tab can be used to switch focus to and from ui elements.
The desired behavior IMO would be:
Enter - Close dialog and execute action of the button currently in focus. 
Esc - Close dialog and execute cancel action.

Andreas 

reua...@gmail.com

unread,
Feb 12, 2021, 6:13:42 AM2/12/21
to iDempiere
Thanks Hengsin and Carlos! 
I 'll create a ticket and also have a look into the matter.
Andreas

Carlos Antonio Ruiz Gomez

unread,
Feb 12, 2021, 6:32:16 AM2/12/21
to idem...@googlegroups.com
> Enter - Close dialog and execute action of the button currently in focus.

Is probably not that straight - as there can be elements in the UI that can interpret enter in a different way, like selecting a value from a list, not saying that's the actual behavior, but I mean Enter is not **always** a confirmation action.

I agree Enter when in the OK button must be a confirmation action, and in some windows Enter is confirmation, like in **some** of the info windows pushing enter in one of the parameters trigger the query, while in other info windows it doesn't (inconsistent behavior).

But in process parameters can lead to executing a long report or a process with the wrong parameters.

> Esc - Close dialog and execute cancel action.

With this I agree, I think Norbert also has proposed this many times.


BTW, something related,I think all buttons can be triggered with space bar when they are focused.

Some time ago I tried on Process Parameter dialog to set the focus by default in the OK button by default, but it was not that trivial, I remember I found some issues and that went beyond my scheduled time.


Regards,

Carlos Ruiz



El 12/2/21 a las 12:10, reua...@gmail.com escribió:

reua...@gmail.com

unread,
Feb 12, 2021, 12:27:50 PM2/12/21
to iDempiere

> Is probably not that straight - as there can be elements in the UI that can interpret enter in a different way, ...

Sure. That is why I would want to execute the action of the button that has the focus. If the focus is on a different element then sure it should be up to the element to make sense of the input.


>> Esc - Close dialog and execute cancel action.
> With this I agree, I think Norbert also has proposed this many times.

That was actually very easy to implement (For the Messagebox only at the moment I'm afraid)
I'll  add a pull request later this evening.

> BTW, something related,I think all buttons can be triggered with space bar when they are focused.

I wish I had read your answer earlier. I spent a couple of hours trying to reinvent the wheel.
This existing solution is good enough for me. I might have a look later and see whether the enter key can be used as well.

 
> Some time ago I tried on Process Parameter dialog to set the focus by default in the OK button by default, but it was not that trivial, 
> I remember I found some issues and that went beyond my scheduled time.

Hm, there are actually the focus() and setFocus() methods for that. I wonder what the stumbling block was.

Andreas

Carlos Antonio Ruiz Gomez

unread,
Feb 12, 2021, 12:53:32 PM2/12/21
to idem...@googlegroups.com
> Hm, there are actually the focus() and setFocus() methods for that. I wonder what the stumbling block was.

I remember my need was something like running "Synchronize column" process 100 times - so not the ideal to make it with mouse, I wanted to do it with keyboard.

1 - when I click on Sync Column button the focus is on "Run as job" - but that's easy - just one Tab and the focus is on OK, space bar and the process is executed

2 - but here is the annoying issue - the process return a message dialog with information "Process completed successfully" - and an OK button, but the focus goes to a field in the window - in my case "System Element" field, and I need 28 tab strokes to get the focus on the OK button, or 48 tab strokes if I execute the button in the grid detail tab.

I tried to get the focus on the dialog with the OK button, but my time for playing with that was exhausted.

Regards,

Carlos Ruiz



El 12/2/21 a las 18:27, reua...@gmail.com escribió:

reua...@gmail.com

unread,
Feb 12, 2021, 1:37:06 PM2/12/21
to iDempiere

reua...@gmail.com

unread,
Feb 15, 2021, 5:28:01 AM2/15/21
to iDempiere

> BTW, something related,I think all buttons can be triggered with space bar when they are focused.

I have meanwhile found that the button action on space bar is not triggered by idempiere or zk but is in fact jquery behavior.
To me that is standard enough. I will not further look into implementing the button action on enter that I had proposed earlier.



> Esc - Close dialog and execute cancel action.

This is now in progress for the Dialog class. 
Do we have any further standard forms and dialogs where it would make sense to have that behavour?
Please post any proposals here. I'll be happy to look into it.

Andreas

Carlos Antonio Ruiz Gomez

unread,
Feb 15, 2021, 7:09:44 AM2/15/21
to idem...@googlegroups.com
Hi Andreas,

Found some candidates:

- "Document Action" dialog
- "About" credits window
- "Attachment" dialog
- "Find" dialog
- "Report" dialog that is shown when clicking the Report button
- "Send Mail" dialog
- "Chat" dialog
- "Post it" dialog
- "Record Access" dialog
- "Export" dialog
- "Import File Loader" dialog
- "Feedback" dialog


On another related topic, most windows can be closed with Alt-X shortcut, but there are some windows that are still pending to implement it, like:
- "Help" window
- "Posting" window
- I think most (if not all) the forms - like "Payment Allocation"


Regards,

Carlos Ruiz



El 15/2/21 a las 11:28, reua...@gmail.com escribió:

Norbert Bede

unread,
Feb 15, 2021, 5:59:11 PM2/15/21
to iDempiere
Hi

I did some test, find inconsistency

https://idempiere.atlassian.net/browse/IDEMPIERE-4410 / Review Shortcuts (probably ESC) for all popovers, modals, dialogs
https://idempiere.atlassian.net/browse/IDEMPIERE-4409 / Review Shortcuts Alt-x for all tab types

hope helps
nb


Reply all
Reply to author
Forward
0 new messages