From a2cba74aaa689eac6befb3398130fe81b511eb23 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sat, 8 Jun 2019 23:14:20 -0600 Subject: [PATCH] Allow tapping/clicking outside popup to close it --- www/css/app.css | 8 ++++++++ www/js/main.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/www/css/app.css b/www/css/app.css index 2ad4197..40239d0 100644 --- a/www/css/app.css +++ b/www/css/app.css @@ -77,6 +77,14 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. background: rgba(0,0,0,0.75); } +.popup-backdrop { + /* + We want the backdrop to exist to enable closing on tap, + but IMO it's better when it's totally transparent + */ + background: rgba(0,0,0,0); +} + #web-barcode-ui.hidden { display: none; } diff --git a/www/js/main.js b/www/js/main.js index fd0af0b..a07f889 100644 --- a/www/js/main.js +++ b/www/js/main.js @@ -21,7 +21,7 @@ var app = new Framework7({ swipeToClose: false }, popup: { - backdrop: false + backdrop: true }, init: true, initOnDeviceReady: false,