mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-19 20:02:52 +08:00
Camera tapping fix
This commit is contained in:
parent
6f7ce333cc
commit
9a9081b0d4
@ -381,11 +381,16 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) {
|
|||||||
|
|
||||||
if (FocusControl.supported === true) {
|
if (FocusControl.supported === true) {
|
||||||
capturePreview.addEventListener('click', function () {
|
capturePreview.addEventListener('click', function () {
|
||||||
|
// Make sure user can't click more than once
|
||||||
|
if (this.getAttribute('clicked') === '1') {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
this.setAttribute('clicked', '1');
|
||||||
|
}
|
||||||
var preset = Windows.Media.Devices.FocusPreset.autoNormal;
|
var preset = Windows.Media.Devices.FocusPreset.autoNormal;
|
||||||
|
var parent = this;
|
||||||
FocusControl.setPresetAsync(preset).done(function () {
|
FocusControl.setPresetAsync(preset).done(function () {
|
||||||
|
parent.setAttribute('clicked', '0');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user