0

I have a window which shows a table on the left half. On the right half I display properties of the item which is selected within the table. The user can now change these properties.

The properties are represented by different kinds of controls: textFields, sliders, numberSteppers and popUpButtons.

Besides using the mouse, the user can use the tab key to navigate through the UI Elements. When the tableView has focus, tab will select the first editable item on the right side, then tab walks through the items and after the last item will go to the table again.

When the table (or any other element) has focus and I use the mouse to change the value of a popUpButton or to move a slider, the default behaviour of the API (Apple's Cocoa) is to change the value but keep the focus where it was.

My intuition would tell me that after changing a control element it should have the focus (i.e. become firstResponder). But I checked some of macOS' preference panes and they behave similarly.

In Apple's Human Interface Guidelines I do not find mention of that specific topic.

So my question is:

Is there a guideline or at least best practice an app should follow regarding if a control element like a popUpButton or slider should get the focus when clicked or edited?

My App also supports a similar enough situation where the user can click an edit button. This will replace the view by a completely different one, but when done editing the previous view should reappear.

Same question here: Which UI element should have the focus after returning from the edit view? My intuition would tell me that the edit-button should have the focus, regardless if it had when it was clicked.

1 Answer 1

1

My intuition would tell me that after changing a control element it should have the focus (i.e. become firstResponder). But I checked some of macOS' preference panes and they behave similarly.

That is not what i would expect. UI controls should not "generally" surrender their focus for the "first responder" control. There are execeptions when it makes sense in your ui. But in your case do you really want to defocus the table after selecting an item? As a user I probably would be annoyed by that. Just try it yourself or let someone else try to use this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.