Merge pull request #13849 from zfox23/MS16003_backCloses

Fix MS16003: In PAL/GoTo WebView, 'BACK' closes app when you can't go back
This commit is contained in:
Zach Fox 2018-08-29 14:29:12 -07:00 committed by GitHub
commit 67e57a9487
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,12 +52,18 @@ Item {
id: back
enabledColor: hifi.colors.darkGray
disabledColor: hifi.colors.lightGrayText
enabled: historyIndex > 0
enabled: true
text: "BACK"
MouseArea {
anchors.fill: parent
onClicked: goBack()
onClicked: {
if (historyIndex > 0) {
goBack();
} else {
closeWebEngine();
}
}
}
}