From 5269dbaa4925b2918d0415100758ed80d2811f78 Mon Sep 17 00:00:00 2001 From: rhysd Date: Tue, 24 Oct 2017 12:20:26 +0900 Subject: [PATCH] =?UTF-8?q?=E5=80=99=E8=A3=9C=E3=82=92=E7=9F=A2=E5=8D=B0?= =?UTF-8?q?=E3=82=AD=E3=83=BC=E3=81=A7=E9=81=B8=E6=8A=9E=E3=81=97=E3=81=9F?= =?UTF-8?q?=E6=99=82=E3=81=AB=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=8C=E3=82=B9?= =?UTF-8?q?=E3=82=AF=E3=83=AD=E3=83=BC=E3=83=AB=E3=81=97=E3=81=A6=E3=81=97?= =?UTF-8?q?=E3=81=BE=E3=81=86=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/crsearch.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/js/crsearch.js b/src/js/crsearch.js index d77fd4d..310237d 100644 --- a/src/js/crsearch.js +++ b/src/js/crsearch.js @@ -283,8 +283,14 @@ export default class CRSearch { let box = $(sel) box.attr('data-crsearch-id', id) - Mousetrap.bind('up', this.selectChange.bind(this, true, box)) - Mousetrap.bind('down', this.selectChange.bind(this, false, box)) + Mousetrap.bind('up', e => { + e.preventDefault() + this.selectChange(true, box) + }) + Mousetrap.bind('down', e => { + e.preventDefault() + this.selectChange(false, box) + }) this.last_input[id] = ''