Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion base/qt/qt_tab_key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ bool FocusNextPrevChildBlocked(not_null<QWidget*> widget, bool next) {
const auto start = focused ? focused : widget.get();
auto w = skip(start);
while (w && w != start) {
if ((w->focusPolicy() & Qt::TabFocus) && widget->isAncestorOf(w)) {
// Like the default traversal: a widget that is hidden or disabled
// is passed over, or Tab lands on something that is not there -
// the field of a collapsed section, or a button shown only while
// its field is focused.
if ((w->focusPolicy() & Qt::TabFocus)
&& w->isVisible()
&& w->isEnabled()
&& widget->isAncestorOf(w)) {
break;
}
w = skip(w);
Expand Down