Switching Focus

I am building a prototype and in it, I have to switch focus from the text field to image and back to another text field. The 7th focus switch is not working. I am going from a text field to a image. I have already done this two times in the demo but it’s not working on this image. I have tried to use a different image. Is there a limit to how often you can switch focus? The file is 2.1 MB is it just getting too big?

There shouldn’t be any kind of limit on how often you switch focus. How are you switching focus? Tab key? Axure interaction? If you swap the last image for another input field does it work? You might need to upload your .rp file for this one.

Yes if I direct focus to a text field it works. But for whatever reason, it won’t set focus on an image. Even though it did on the first two images.
So I cheated, you guys will probably revoke my Axure license for doing this:wink: I put a transparent text field around the images and it works. I would like to figure out why it’s not setting focus to an image so I’m not having to wrap it with a text field.

In order for a widget to be focusable it needs some kind of interaction, otherwise the browser treats it as “dead” and not worthy of getting focus. So, my guess is your first two images have some kind of interaction event defined.

You can use most events (but not events like OnMouseEnter) and the “interaction” can be empty. For example, you can select a widget, double-click the OnFocus event and click OK straight away–you will be left with an empty “Case 1” but this will render the widget focusable. I recommend renaming “Case 1” to something you/others will understand, like “Keep to get focus” and not misinterpret it as an accidental or now-unused event and feel an urge to delete it.

Thanks for the reply mbc66. I have also Dynamic Panels that have interaction on them but dont take the focus. Dynamic Panels should take focus correct?

I also tried created the the same object and just Grouped the elements. Still not taking the focus.


See this demo file with a text field and three dynamic panels. The panels will get focus in order when the Tab key is pressed. In a browser, when the last focusable element gets focus and Tab is pressed again, it will typically shift focus to the URL bar or other control in the browsers chrome. To keep the focus on the page, I added a hidden widget (just a hotspot in this case) with a Got Focus event that sets the focus on the first item. This lets a user Tab-Tab-Tab through the UI and keep the focus on the page.

Tab to focus.rp (51.9 KB)

Thanks again nbc66. Unfortunately I am unable to see your sample I am running version 8.
I fallowed your advice and added actions to the objects first. Then on lost focus go to the next field and I select the next field in the order. Unfortunately when I have the first field load on page load and then tab through them it works on the first one then it jumps to the browser. If I continue to tab through it will go in circles but only adding one additional field at a time.

Test focus2.rp (244.8 KB)

Oh, I’m sorry–I didn’t even notice this was in the RP8 forum :persevere:

Here is a version for RP8: Tab to focus RP8.rp (81.7 KB)

The trick is to place a widget as the “last focusable object” in the tab order (this means it would be “in the front” or at the top of the stack in the Outline Pane, as the tab order of widgets moves from “back to front” or bottom to top in the Outline (if you view all widgets in the Outline pane.) Then when this widget gets focus, its OnFocus event sets the focus to the first widget in the tab order. In this way, the focus never leaves the web page content. Just a little trick I invented when testing a prototype with blind users and screen readers–they really got confused when rapidly tabbing through an interface and the browser URL got announced (and they thought they were using a custom device with embedded UI.) Hotspot widgets work best for this because they are not visible in the browser and they don’t show any visible change when they receive focus, yet they are discoverable in the editor.

Here is your file, updated to keep that tab focus on your content. I noticed you have 3 widgets all named “CustomerSearch” and assume that’s just a typo (or “paste-o” as it were) and you want to start at the actual search field. Also, since the QtyBackorder input fields are hidden to start, and get shown when focused, I also assumed they should be hidden when they lose focus. Now, a hidden widget can’t get focus, so it first needs to be shown and then set focus on it. You’ll see the hotspot I named “Last Focus Spot” --its OnFocus event has “Set Focus on CustomerSearch” (your first focusable widget) thus bypassing the default tab order (take that ya stupid browser! :smiling_imp: )

Test focus2.rp (305.1 KB)