Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 10 additions & 2 deletions app/qml/filters/components/MMFilterDateInput.qml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ Column {
return Qt.formatDate( root.currentValue[0] )
}

onTextClicked: fromCalendarLoader.active = true
onTextClicked: {
root.forceActiveFocus()
fromCalendarLoader.active = true
}

onRightContentClicked: {
if (checked) {
textField.clear()
Expand Down Expand Up @@ -149,7 +153,11 @@ Column {
return Qt.formatDate( root.currentValue[1] )
}

onTextClicked: toCalendarLoader.active = true
onTextClicked: {
root.forceActiveFocus()
toCalendarLoader.active = true
}

onRightContentClicked: {
if (checked) {
textField.clear()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ Column {
}

function openDrawer() {
forceActiveFocus()
dropdownDrawerLoader.active = true
dropdownDrawerLoader.focus = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ Column {
}

function openDrawer() {
forceActiveFocus()
dropdownDrawerLoader.active = true
dropdownDrawerLoader.focus = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ Column {
}

function openDrawer() {
forceActiveFocus()
dropdownDrawerLoader.active = true
dropdownDrawerLoader.focus = true
}
Expand Down
2 changes: 2 additions & 0 deletions app/qml/form/editors/MMFormCalendarEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ MMPrivateComponents.MMBaseSingleLineInput {
}

function openCalendar() {
forceActiveFocus()

if (root._fieldValueIsNull || _fieldHasMixedValues) {
root.openPicker( new Date() )
}
Expand Down
2 changes: 2 additions & 0 deletions app/qml/form/editors/MMFormComboboxBaseEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ MMPrivateComponents.MMBaseSingleLineInput {
}

function openDrawer() {
forceActiveFocus()

drawerLoader.active = true
drawerLoader.focus = true
}
Expand Down
6 changes: 5 additions & 1 deletion app/qml/form/editors/MMFormGalleryEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ MMPrivateComponents.MMBaseInput {
text: model.FeatureTitle

onClicked: function( path ) {
root.forceActiveFocus()
root.openLinkedFeature( model.FeaturePair )
}
}
Expand Down Expand Up @@ -98,7 +99,10 @@ MMPrivateComponents.MMBaseInput {

MMComponents.MMSingleClickMouseArea {
anchors.fill: parent
onSingleClicked: root.createLinkedFeature( root._fieldController.featureLayerPair, root._fieldAssociatedRelation )
onSingleClicked: {
root.forceActiveFocus()
root.createLinkedFeature( root._fieldController.featureLayerPair, root._fieldAssociatedRelation )
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions app/qml/form/editors/MMFormPhotoEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ MMFormPhotoViewer {
* Called when clicked on the camera icon to capture an image.
*/
function capturePhoto() {
forceActiveFocus()
updateTargetDir()
if ( !__inputUtils.createDirectory( targetDir ) )
{
Expand Down Expand Up @@ -317,6 +318,7 @@ MMFormPhotoViewer {
* Then "imageSelected" caught the signal, handles changes and sends signal "valueChanged".
*/
function chooseFromGallery() {
forceActiveFocus()
updateTargetDir()
if ( __androidUtils.isAndroid ) {
__androidUtils.callImagePicker( targetDir, root._fieldIndex )
Expand All @@ -336,6 +338,7 @@ MMFormPhotoViewer {
* \param imagePath Absolute path to an image.
*/
function removeImage( path ) {
forceActiveFocus()
if ( __inputUtils.fileExists( path ) ) {
imageDeleteDialog.imagePath = path
imageDeleteDialog.open()
Expand Down
1 change: 1 addition & 0 deletions app/qml/form/editors/MMFormPhotoViewer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ MMPrivateComponents.MMBaseInput {
visible: root.editState === "enabled" && photoStateGroup.state !== "notSet" && __activeProject.photoSketchingEnabled && root.photoUrl.startsWith("file:///")

onClicked: {
root.forceActiveFocus()
sketchingLoader.active = true
sketchingLoader.focus = true
}
Expand Down
6 changes: 5 additions & 1 deletion app/qml/form/editors/MMFormRelationEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ MMPrivateComponents.MMBaseInput {
MouseArea {
anchors.fill: parent
onClicked: function( mouse ) {
root.forceActiveFocus()
mouse.accepted = true
listLoader.active = true
listLoader.focus = true
Expand Down Expand Up @@ -146,7 +147,10 @@ MMPrivateComponents.MMBaseInput {

MMComponents.MMSingleClickMouseArea {
anchors.fill: parent
onSingleClicked: root.openLinkedFeature( model.FeaturePair )
onSingleClicked: {
root.forceActiveFocus()
root.openLinkedFeature( model.FeaturePair )
}
}

onVisibleChanged: root.recalculateVisibleItems()
Expand Down
1 change: 1 addition & 0 deletions app/qml/form/editors/MMFormRelationReferenceEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ MMPrivateComponents.MMBaseSingleLineInput {
}

onRightContentClicked: {
forceActiveFocus()
listLoader.active = true
listLoader.focus = true
}
Expand Down
1 change: 1 addition & 0 deletions app/qml/form/editors/MMFormScannerEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ MMPrivateComponents.MMBaseSingleLineInput {
if (!__inputUtils.acquireCameraPermission())
return

forceActiveFocus()
codeScannerLoader.active = true
codeScannerLoader.focus = true
}
Expand Down
Loading