禁用类星体滑块箭头密钥事件
进行滑块输入时,即使完成鼠标事件后,箭头键也绑定到该滑块。使用arrowleft/arrowright步骤q-slider一个值并停止关键事件。 我正在使用箭头键(document.addeventlistener(“ onkeydown”,(e:event)=> {// ...}
),并希望禁用此信息行为。在类星体滑块上。
When doing a slider input the arrow keys are bound to that slider, even after the mouse event is finished. Using arrowLeft/arrowRight steps the q-slider one value and stops the key event.
I'm using the arrow keys for something else in my application (document.addEventListener("onkeydown",(e: Event)=>{//...}
) and want to disable this behavior. On normal HTML sliders, I can do <input type="range" onkeydown="event.preventDefault();return true;" />
to disable this, but this does not work on the Quasar sliders.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过捕获文档上的所有关键事件来解决它。
Solved it by capturing all key events on the document.