Bug #1395
openProblem with modal dialogs
0%
Description
Hello,
I have a problem with modal dialogs:
If I open a modal dialog, all other widgets are blocked. They will be displayed grayed and I can not put the focus in a widget by clicking it with the mouse. Ok - that is what I expect, if I open a modal dialog.
But the problem is: If I click on the address bar of the browser and press tab twice, the first widget of the blocked widgets gets the focus. It is grayed, but I see a I-beam in this widget and I can enter a value. If I go not to the address bar, I can reproduce this, by pressing sometimes more the tab key. This happens in firefox. In google chrome I can go with only one tab key to the first WLineEdit Widget, that is blocked from the modal dialog - without focusing the address bar.
The problem can be reproduced with the HelloWt example, by adding a messagebox (which is a modal dialog), if the greet me button is pressed. (Code see Bug #1389).
The other problem is, that signal handlers if form of a function (installed with connect (T *target, void(V::*method)())) are disabled, but signal handlers in form of a JSlot (installed with void connect (JSlot &slot)) are triggered, when a modal dialog is active and the blocked/grayed WLineEdit has the focus.
Best regards
Herbert
Updated by Wim Dumon over 12 years ago
Hello Herbert,
That's a known issue, but unfortunately very difficult to solve - tab behavior of browsers is not well standardized. Note that security-wise this is not a problem, since all server-side events for the disabled widgets are ignored, and client-side the user can always to whatever he wants (editing the DOM tree using firebug), so we don't trust anything there anyway. The annoying thing is that a user which randomly presses tab and enter, may unintentionally bring the program in an unsynchronized state, where server and client don't agree on the contents of the DOM tree.
Suggestions for solving this issue are welcomed.
Best regards,
Wim.
Updated by Anonymous over 12 years ago
The problems seems not to occur on the jQuery UI implementation of Dialogs. http://jqueryui.com/demos/dialog/#modal-form