Jemt / Fit.UI

Fit.UI is a JavaScript based UI framework built on Object Oriented principles
http://fitui.org
GNU Lesser General Public License v3.0
19 stars 7 forks source link

Dialog button retains focus when not supposed to #64

Closed Jemt closed 5 years ago

Jemt commented 5 years ago

Consider the following example:

var d = new Fit.Controls.Dialog();
d.Content("Hello world<br>How are you today?<br>This looks pretty good.<br><br><br>See you later..");
d.Modal(true);

var b = new Fit.Controls.Button();
b.Title("Click me");
b.OnClick(function(sender)
{
    Fit.Controls.Dialog.Alert("Hi there..");
});

d.AddButton(b);
d.Open();

The Alert dialog opened from the initial dialog is supposed to have its OK button focused, but the button opening the Alert dialog remains focused. See screenshot below.

image

While this may seem like a minor bug its actually quite problematic as access to the dialog in the background cannot reliably be prevented, allowing the user to interact with the blocked dialog using the keyboard.

Jemt commented 5 years ago

Fixed.

image