[FIXED] Possible keyboard bug in alert()

What I’m trying to do:
Shift-Tab off of the first field in my alert(), to the final button on my alert().

What I’ve tried and what’s not working:
What happens instead is that focus goes back to the widgets on the parent form.

I believe this is a bug. An alert() is essentially a modal dialog box, so the user should not be able to reach any widgets that are outside of the box.

If there’s a rationale for doing otherwise,

  1. I’d like to hear it.
  2. I’d like to know how to make such a modal box.
1 Like

Agreed, this should be expected behaviour for all the reasons.
Moved to bug reports.

1 Like

I’m very happy for your attention to this matter!

Today’s experience (2024-3-28T9:50 Florida time): I know that the post title has received a "[FIXED] " prefix, but that seems to be premature. I’ve just tried it in the IDE, via Chrome (just updated a few minutes ago), Run in New Tab, and Shift-Tab still switches focus to the parent form.

Then I tried it in Firefox, no IDE. Shift-Tab switched to tab-enabled widgets in the browser task bar.

Perhaps the fix has not actually been deployed yet.

good spot - yes it’s fixed locally but not yet deployed

Any news when it will be deployed?

Yes should now be deployed I believe (not at my computer so haven’t checked yet, shout if it doesn’t seem to be working and I’ll take a look)

Yeah it doesn’t seem to be working. When I use Tab or shift+tab, focus doesn’t stay in the alert. I’m not sure if it goes to the parent form (doesn’t look like it), but it sure doesn’t cycle in the alert and it takes just as many tabs/shift+tabs to return focus to the alert.

Ok it’s working for me as expected.
Make sure you run the app in a new tab
(if you run it in the designer in an iframe then it won’t work the same way because tabbing will jump out of the iframe)

Here’s a blank app that shows you what i’m seeing

After opening an alert, hitting tab cycles through:

  1. document body
  2. alert body
  3. yes button
  4. no button
  5. back to 1

It never cycles to the button underneath the alert that triggered the alert
(which is the bug we were fixing)

If still not working, let me know your browser/OS, and a clone might be handy.

Thanks for working on this.

When I use Shift-Tab (or Tab, enough times), focus goes into a small number of browser bar widgets, before cycling back into the Alert. The set of browser widgets accessed is browser-dependent, but is consistent across both apps. Cycling does not reach any other App widgets, as far as I can tell.

I haven’t tried every possible combination. I’ve checked 4:

  • Chrome (version updated this morning, in IDE, Run in New Tab) and Firefox (no Anvil IDE)


  • two of my Apps, one old and one new.

For my users, who have probably never heard of Shift-Tab, this is more than adequate. Thank you!