From ecd5cb940dc9e0339aae5d968999f521c954cfb7 Mon Sep 17 00:00:00 2001 From: Melloware Date: Sun, 4 Feb 2024 12:31:14 -0500 Subject: [PATCH] Splitter: Fix keyboard repeat behavior --- components/lib/splitter/Splitter.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/components/lib/splitter/Splitter.vue b/components/lib/splitter/Splitter.vue index 89d308139..d0ee1b3ef 100644 --- a/components/lib/splitter/Splitter.vue +++ b/components/lib/splitter/Splitter.vue @@ -158,14 +158,16 @@ export default { this.onResize(event, step, true); }, setTimer(event, index, step) { - this.clearTimer(); - this.timer = setTimeout(() => { - this.repeat(event, index, step); - }, 40); + if (!this.timer) { + this.timer = setInterval(() => { + this.repeat(event, index, step); + }, 40); + } }, clearTimer() { if (this.timer) { - clearTimeout(this.timer); + clearInterval(this.timer); + this.timer = null; } }, onGutterKeyUp() {