on xenial help sign in
hide OSK (unfocus search) when opening a preview
d5f8ac2Michael Zanetti
Components/PageHeader.qml+4
@@ -48,6 +48,10 @@ Item {
48 searchField.focus = false;
48 searchField.focus = false;
49 }
49 }
50
50
51+ function unfocus() {
52+ searchField.focus = false;
53+ }
54+
51 Connections {
55 Connections {
52 target: greeter
56 target: greeter
53 onShownChanged: if (shown) resetSearch()
57 onShownChanged: if (shown) resetSearch()
Dash/GenericScopeView.qml+3−3
@@ -388,7 +388,6 @@ ScopeView {
388 }
388 }
389
389
390 if (open) {
390 if (open) {
391− print("switching to new index", currentIndex)
392 categoryDelegate.highlightIndex = currentIndex
391 categoryDelegate.highlightIndex = currentIndex
393 }
392 }
394
393
@@ -404,13 +403,13 @@ ScopeView {
404 effectAdjust += newContentY;
403 effectAdjust += newContentY;
405 newContentY = 0;
404 newContentY = 0;
406 }
405 }
407− if (newContentY > categoryView.contentHeight - categoryView.height) {
406+ if (newContentY > Math.max(0, categoryView.contentHeight - categoryView.height)) {
408 effectAdjust += -(categoryView.contentHeight - categoryView.height) + newContentY
407 effectAdjust += -(categoryView.contentHeight - categoryView.height) + newContentY
409 newContentY = categoryView.contentHeight - categoryView.height;
408 newContentY = categoryView.contentHeight - categoryView.height;
410 }
409 }
411
410
412 effect.positionPx = effectAdjust;
411 effect.positionPx = effectAdjust;
413− categoryView.contentY = newContentY;
412+ categoryView.contentY = newContentY - categoryView.originY;
414 }
413 }
415
414
416 property bool open: false
415 property bool open: false
@@ -420,6 +419,7 @@ ScopeView {
420 if (open) {
419 if (open) {
421 onScreen = true;
420 onScreen = true;
422 categoryDelegate.highlightIndex = currentIndex;
421 categoryDelegate.highlightIndex = currentIndex;
422+ pageHeader.unfocus();
423 } else {
423 } else {
424 // Cancel any pending preview requests or actions
424 // Cancel any pending preview requests or actions
425 if (previewListView.currentItem.previewData !== undefined) {
425 if (previewListView.currentItem.previewData !== undefined) {