summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@digia.com>2013-06-06 15:20:51 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-10 10:56:52 +0200
commite22a7ffb4355ae359344efe881e74edeb65a3d08 (patch)
treebcf6faf7d34d1e697a56e5c62d1bbe979ad08157
parent39ed137e71326411083c27c1d132769c33200df4 (diff)
downloadqtquickcontrols-e22a7ffb4355ae359344efe881e74edeb65a3d08.tar.gz
Don't let tabs grab focus on press
Tab buttons should never take focus when pressed, but only pass on focus to their child items. Tab focus should only get focus when they are tabbed into. Autotest is updated. Change-Id: I0edad4d893be7ed7066d3a3631ca340e9bf8cb53 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
-rw-r--r--src/private/TabBar.qml2
-rw-r--r--tests/auto/controls/data/tst_tabview.qml2
2 files changed, 1 insertions, 3 deletions
diff --git a/src/private/TabBar.qml b/src/private/TabBar.qml
index 6bcf795c..f51d60b2 100644
--- a/src/private/TabBar.qml
+++ b/src/private/TabBar.qml
@@ -183,8 +183,6 @@ FocusScope {
var next = tabbar.nextItemInFocusChain(true);
if (__isAncestorOf(tabView.getTab(currentIndex), next))
next.forceActiveFocus();
- else
- tabitem.forceActiveFocus();
}
Loader {
diff --git a/tests/auto/controls/data/tst_tabview.qml b/tests/auto/controls/data/tst_tabview.qml
index 85ad4346..8093ebc3 100644
--- a/tests/auto/controls/data/tst_tabview.qml
+++ b/tests/auto/controls/data/tst_tabview.qml
@@ -365,7 +365,7 @@ TestCase {
waitForRendering(tab3)
mouseClick(tab3, tab3.width/2, tab3.height/2)
- verify(tab3.activeFocus)
+ verify(!tab3.activeFocus)
verify(!textField.activeFocus)
tabView.destroy()