Skip to content

Commit

Permalink
add test case for #11
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasCARPi committed Jan 5, 2024
1 parent e683a31 commit dc77a64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ <h2>Selecting behavior on Enter keypress</h2>
<p><code>data-ma-enter='cancel'</code><br><span data-malleable='true' data-ma-enter='cancel'>Pressing Enter will cancel edition.</span></p>
<p><code>data-ma-enter='submit'</code><br><span data-malleable='true' data-ma-enter='submit'>Pressing Enter will submit changes.</span></p>
<p><code>data-ma-enter='ignore'</code><br><span data-malleable='true' data-ma-enter='ignore'>Pressing Enter will do nothing.</span></p>
<h2>Setting behavior for both Blur action and Enter keypress</h2>
<p data-malleable='true' data-ma-enter='submit' data-ma-blur='submit'>This text will submit onBlur and also onEnter.</p>
<h3>Same with Escape keypress</h3>
<p class='tip'>The default behavior is to Cancel action, but here is an example to ignore an Escape keypress:</p>
<p><code>data-ma-escape='ignore'</code><br><span data-malleable='true' data-ma-escape='ignore'>Pressing Escape will do nothing.</span></p>
Expand Down
4 changes: 2 additions & 2 deletions demo/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dc77a64

Please sign in to comment.