Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
[Windows] Focus fails on multiple taps
Browse files Browse the repository at this point in the history
Added missing handling case for Windows 10 Mobile
  • Loading branch information
daserge committed Jun 22, 2016
1 parent 55e6938 commit f18ed1a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/windows/BarcodeScannerProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,16 @@ module.exports = {
return WinJS.Promise.timeout(INITIAL_FOCUS_DELAY)
.then(function () {
try {
return controller.focusControl.focusAsync();
return controller.focusControl.focusAsync().then(function () {
return result;
}, function (e) {
// This happens on mutliple taps
if (e.number !== OPERATION_IS_IN_PROGRESS) {
console.error('focusAsync failed: ' + e);
return WinJS.Promise.wrapError(e);
}
return result;
});
} catch (e) {
// This happens on mutliple taps
if (e.number !== OPERATION_IS_IN_PROGRESS) {
Expand Down

0 comments on commit f18ed1a

Please sign in to comment.