From dc77a64966746b85512ccbe39dd9c92e47951e0f Mon Sep 17 00:00:00 2001 From: Nicolas CARPi Date: Sat, 6 Jan 2024 00:18:49 +0100 Subject: [PATCH] add test case for #11 --- demo/index.html | 2 ++ demo/main.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/demo/index.html b/demo/index.html index 277d8e7..3457551 100644 --- a/demo/index.html +++ b/demo/index.html @@ -41,6 +41,8 @@

Selecting behavior on Enter keypress

data-ma-enter='cancel'
Pressing Enter will cancel edition.

data-ma-enter='submit'
Pressing Enter will submit changes.

data-ma-enter='ignore'
Pressing Enter will do nothing.

+

Setting behavior for both Blur action and Enter keypress

+

This text will submit onBlur and also onEnter.

Same with Escape keypress

The default behavior is to Cancel action, but here is an example to ignore an Escape keypress:

data-ma-escape='ignore'
Pressing Escape will do nothing.

diff --git a/demo/main.js b/demo/main.js index 269befa..05ce056 100644 --- a/demo/main.js +++ b/demo/main.js @@ -9,9 +9,9 @@ import config from './config.js'; // in dev mode the lib is in the parent folder, but in the docker image it is in the current dir -let libPath = './malle.js'; +let libPath = './main.js'; if (config.env === 'dev') { - libPath = '.' + libPath; + libPath = '../dist/' + libPath; } // use a dynamic named import here