From 9b52bcec7d830a01cbfeddd1fc52f3a324d58184 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sat, 8 May 2021 17:36:34 -0600 Subject: [PATCH] Fix haptic feedback --- www/assets/js/main.js | 2 +- www/assets/js/platform.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/www/assets/js/main.js b/www/assets/js/main.js index e6c9677..aa23275 100644 --- a/www/assets/js/main.js +++ b/www/assets/js/main.js @@ -81,7 +81,7 @@ function handleBackButton() { } } -$(document).on("touchdown", ".hapticbtn,.input-clear-button,.button,.link", function () { +$(document).on("mousedown", ".hapticbtn,.input-clear-button,.button,.link", function () { doHapticFeedback(); }); diff --git a/www/assets/js/platform.js b/www/assets/js/platform.js index e5cf02c..6ea23df 100644 --- a/www/assets/js/platform.js +++ b/www/assets/js/platform.js @@ -144,9 +144,9 @@ function initCordova() { // Make sure the status bar color is set properly applyColorTheme(); - if (typeof device != "undefined" && device.platform == "android") { + if (typeof device != "undefined" && device.platform == "Android") { doHapticFeedback = function () { - window.plugins.deviceFeedback.haptic(window.plugins.deviceFeedback.VIRTUAL_KEY); + window.plugins.deviceFeedback.acoustic(); } }