Skip to content

Commit

Permalink
[sailfish-components-webview] Fix for input prompts. Fixes JB#54845 O…
Browse files Browse the repository at this point in the history
…MP#JOLLA-231
  • Loading branch information
Marko Kenttala committed Jul 8, 2021
1 parent 7b47472 commit 055b959
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions examples/custompopups/CustomPromptPopup.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ import Sailfish.WebView.Popups 1.0

PromptPopupInterface {
id: popup

property bool canAccept: input.text.length > 0

width: (parent.width/5)*4
height: (parent.height/5)*4
anchors.centerIn: parent

acceptText: "Ok"
cancelText: "Cancel"

value: input.text
preventDialogsValue: toggle.checked

property bool canAccept: input.text.length > 0
onAccepted: value = input.text

Rectangle {
anchors.fill: parent
Expand Down
2 changes: 1 addition & 1 deletion import/popups/PromptDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Dialog {
canAccept: input.text.length > 0

property alias text: prompt.text
property alias value: prompt.value
property alias value: input.text

property alias acceptText: prompt.acceptText
property alias cancelText: prompt.cancelText
Expand Down

0 comments on commit 055b959

Please sign in to comment.