How to prevent focus shift when switching between tabs

I’ve been experiencing a focus shift in map view whenever I switch between tabs.

Question: How can one prevent TBX from doing this?

1 Like

Tabs generally retain their focus, otherwise it is difficult to work with more than one note at a time without changing the focus in the current tab. It used to be the case that changing to a tab with different focus changed the new tab to the old focus, but that now seems to be fixed.

To turn this around and step away from intuition/expectation. What is the actual problem you are trying to overcome?

Easily explained: Whenever I return from a tab 2 to a previous tab (tab 1) I need (!) the notes previously in focus there (in tab 1) still being in focus.

The uploaded gif should easily illustrate how much the focus shifts just within two or three to-and-fro-moves between tabs.

So, I am afraid I am missing the point of your question @mwra entirely, namely:

What is the actual problem you are trying to overcome?

OK, I’m lost now too, partly because the GIF runs so fast. In you GIF, I see you start on Map ‘content’ with ‘test 02’ selected. You then switch to a different Map ‘Prototypes’ which loads its own current selection ‘Task’ as the text pane content. You then switch back to the original map, and ‘test 02’ re-takes focus.

What am I missing? Here, in this context, I’m assuming that by ‘focus’ you mean the selected view item which is shown in the text pane. I can see you might in fact be referring to the positioning of the map. Known, but never properly explained is the fact that as you move between tabs (or navigate up/down through Maps) the portion of the map being displayed can change unexpectedly. If the latter, I don’t think users have an answer, you’d need to ask Eastgate.

I think we’ve got a terminology question here. In my usage:

selection is the state of a note in a document. Selected notes can be deleted or copied, and in map view they can be resized.

focus is the state of a view (actually, of a window); the view that “has the focus” is the view that received keyboard events.

scroll position is the state of a map view in a window; notionally, it’s the map coordinate of the center of the view.

I think we’re talking about scroll position, but I’m not sure.

1 Like

@eastgate your right: I should have written “scroll position” in order to make clear what I meant and still mean.

And now, since we do know that we talk about scroll position, may I ask whether this is supposed to work like this? Because for me, it’s rather distracting.

It’s not designed to shift; I’m not sure it’s designed not to shift. I believe that it’s designed to ensure that the selected note is visible.

I’ll check the code.

You’re absolutely right, @eastgate. The scrolling position is kept once the note in question is selected before switching tabs. Works well as sort of a workaround if you like.

Not selecting the note, however, really scrolls the maps around quite a lot and therefore sometimes makes it hard to keep the focus (!) and the work flawlessly flowing :wink:

Will this be fixed in a future update, because its really irritating. Thx!

Yes, it’s addressed in the current backstage build.

2 Likes