HTML Canvas双击突出显示问题 [英] HTML Canvas Double Click Highlight Issue
问题描述
我有一个HTML画布,我实现了一个简单的双击功能。当页面只包含一个画布,一切工作正常。但是,一旦我添加,例如,一个简单的文本输入字段,每次我双击奇怪的东西开始被突出显示(尝试随机点击此页面的某些部分,并出现类似的情况)。
I have an HTML canvas and I have implemented a simple double click function. When the page contains only a canvas, everything works fine. However, as soon as I add, for example, a simple text input field, everytime I double click strange things start to get highlighted (try randomly clicking on certain parts of this page and a similar situation arises).
要解决这个问题最好的方法是什么?我需要把画布包裹在一些东西中(我试过将它封装在一张表中,但是情况更糟),或者我需要断开一个特定的信号。
What's the best way to get around this? Do I need to enclose the canvas in something (I tried enclosing it in a table but that made the situation worse) or do I need to disconnect a specific signal.
谢谢
推荐答案
我发现这个问题的一个简单的答案
I found a simple answer to this problem here
a href =http://stackoverflow.com/questions/3799686/clicking-inside-canvas-element-selects-text>点击canvas元素选择文本
Clicking inside canvas element selects text
这篇关于HTML Canvas双击突出显示问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!