]> git.ktnx.net Git - lsl.git/commitdiff
submit with Enter in list editor dialog too
authorDamyan Ivanov <dmn@debian.org>
Sun, 6 Mar 2022 20:10:40 +0000 (20:10 +0000)
committerDamyan Ivanov <dmn@debian.org>
Sun, 6 Mar 2022 20:10:40 +0000 (20:10 +0000)
public/javascripts/lsl.js

index 3e66db6ede1441b20f9e361e286b30d5a8659af9..92e089763fb138fd5e1528ea56d1f3af90bf75dd 100644 (file)
@@ -92,6 +92,14 @@ function edit_list() {
                 .append(
                     $('<legend>').text('List name'),
                     $('<input type="text" size="10">')
+                    .on('keypress', (ev) => {
+                        if (13 == ev.keyCode) {
+                            save_list(d);
+                            return false;
+                        }
+
+                        return true;
+                    })
                     .val(selected_list.data('lsl-name'))
                 )
         );