From 3f9baa7272327cd143e6e2cfe56a14e31634a701 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 15 Apr 2018 12:04:52 +0200 Subject: dont focus cursor_input on mobile --- js/ui/controls.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/ui/controls.js') diff --git a/js/ui/controls.js b/js/ui/controls.js index 315395d..1ed7179 100644 --- a/js/ui/controls.js +++ b/js/ui/controls.js @@ -233,11 +233,11 @@ var controls = (function(){ controls.advanced.memorable = true controls.advanced.use = function(state){ console.log(state) - state = document.body.classList.contains('panke') + state = typeof state == "boolean" ? state : ! document.body.classList.contains('panke') if (state) - document.body.classList.remove('panke') - else document.body.classList.add('panke') + else + document.body.classList.remove('panke') this.update(state) } -- cgit v1.2.3-70-g09d2 From 4b7d6d32ed9e440dc08257148a2c10162a6e90f8 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 15 Apr 2018 12:36:41 +0200 Subject: focus --- js/ui/controls.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js/ui/controls.js') diff --git a/js/ui/controls.js b/js/ui/controls.js index 1ed7179..f75ee67 100644 --- a/js/ui/controls.js +++ b/js/ui/controls.js @@ -346,6 +346,7 @@ var controls = (function(){ ].forEach(function(lex){ lex.span.addEventListener('mousedown', function(e){ lex.focus() + if (is_mobile) cursor_input.focus() }) }); -- cgit v1.2.3-70-g09d2