**Behavior in the editor** click in the editor on a tab-title result: the content of the tab is in focus, how it should be, what can be tested with the arrow-up/down-key of the keyboard
**Behavior of the Documents-tab in the sidebar** click in the sidebar on the tab-title of the Documents-tab result: the content of the Documents-tab is in focus, how it should be, what can be tested with the arrow-down-key of the keyboard
**Behavior of the Preview-tab in the sidebar** (the Preview-tab ist part of the plugin Preview: https://github.com/xiota/geany-preview) click in the sidebar on the tab-title of the Preview-tab result: the content of the Preview-tab is NOT in focus, what can be tested with the arrow-up/down-key of the keyboard when a very long webpage is shown in the Preview-tab
**Behavior of the Files-tab in the sidebar (the Files-tab ist part of the plugin File Browser)** click in the sidebar on the tab-title of the Files-tab result: the content of the Files-tab is NOT in focus, what can be tested with the arrow-up/down-key of the keyboard; after a release of a click in the tab-title of the Files-tab the first tool of the toolbar is in focus that is located in the Files-tab
**Possible problem** it could be that the problem in Preview is that a not existing toolbar is in focus by default after a release of a click on the tab-title of the Preview-tab, like on the Files-tab, because if I press 1x the arrow-down-key, then the content of the Preview-tab is in focus
**History** This issue is based on the knowledge of https://github.com/xiota/geany-preview/issues/15.
**System** Lubuntu 23.10 Geany 1.38
Can you handle this issue or should I report it upstream to the GTK developers?
Closed #1320 as not planned.
This report should be to https://github.com/xiota/geany-preview, it is not part of the Geany project.
The issue is about the behavior of any plugin-tab in the sidebar. Plugins have no influence on the behavior about the release of a click on the tab-title, so it belongs to Geany.
To be clear, Geany does not know anything about the existence of any plugin or the contents of any tabs it adds to Geany notebooks, even plugins included in the Geany project itself. Therefore plugins are entirely responsible for the behaviour of their UI. Plugins should connect to the relevant signal eg "switch-page" or "focus-tab" or "clicked" on the tab or whatever and then implement the behaviour they require.
Remember I said elsewhere the tab and the contents are different things, and in standard GTK the tab can be focussed instead of the content by clicking it when the page is current. That is the standard behaviour of GTK Notebook, and is how the Documents and Symbols tabs behave. Geany modifies it for the editor notebook to move the focus by intercepting the signals and returning focus to the content (the editor widget) as well as other actions the click might invoke, and the plugin can do so for its tabs if it wishes.
Geany provides a [plugin API](https://www.geany.org/manual/reference/) and that is all the interaction it has with plugins, it has no knowledge of what a plugin might do or what its UI is. A plugin can add pages to the sidebar notebook using standard GTK calls and techniques without any interaction with Geany as the notebook widget is [exposed](https://www.geany.org/manual/reference/structGeanyMainWidgets.html) in the API.
Thank you for your explication. OK, the issue does not belong to the Geany project but to the plugin Preview.
Do you know if it is possible to solve the issue in the plugin Preview like this, that after a release of a click on the tab-title of the Preview tab the content of the tab is in focus and not the tab itself?
Plugins should connect to the relevant signal eg "switch-page" or "focus-tab" or "clicked" on the tab or whatever and then implement the behaviour they require.
I have no idea how to program software. Does something exist like "focus-content"?
Thank you for an answer.
Does something exist like "focus-content"?
In GTK (and most other GUI systems) the concept of "focus" is the widget that is going to get keyboard input, the mouse can move around and point to things before a button click, but there is not a similar capability for the keyboard, a widget has "focus" and does not depend on the position of the mouse. So focus is usually on something in the content, like the search entry in the Symbols tab, or the tree. But you need to know it exists. You can see some of the problems around this even for built-in parts of Geany when the contents change in #3678.
github-comments@lists.geany.org