我做了一个分页控件,我注意到当点击按钮时,很容易意外地 Select 单个图像和文本.有可能防止这种情况吗?
To clarify selecting I mean highlighting with the mouse. (Try dragging your mouse from one side of the screen to the other.)
如果您试图突出显示此网格中的文本/控件,则无法 Select .这是怎么做到的?
我做了一个分页控件,我注意到当点击按钮时,很容易意外地 Select 单个图像和文本.有可能防止这种情况吗?
To clarify selecting I mean highlighting with the mouse. (Try dragging your mouse from one side of the screen to the other.)
如果您试图突出显示此网格中的文本/控件,则无法 Select .这是怎么做到的?
dragging and selecting both initialize on a mouse down event and update on subsequent mouse moves. When you handle the events to begin dragging, or to follow the mouse, cancel the event's bubbling and override the default browser return:
something like this in your begin dragging mousedown and move handlers-
e=e || window.event; pauseEvent(e);
function pauseEvent(e){
if(e.stopPropagation) e.stopPropagation();
if(e.preventDefault) e.preventDefault();
e.cancelBubble=true;
e.returnValue=false;
return false;
}