*
* -for IE/Opera added CLASSNAME_PRESSED
*
- * -event.preventDefault() commented from ONMOUSEDOWN (Firefox won't apply
+ * -event.preventDefault() removed from ONMOUSEDOWN (Firefox won't apply
* :active styles if it is present)
*
* -Tooltip event handling added
setFocus(true);
DOM.setCapture(getElement());
isCapturing = true;
- // Prevent dragging (on some browsers);
- event.preventDefault();
- if (BrowserInfo.get().isIE() || BrowserInfo.get().isOpera()) {
- addStyleName(CLASSNAME_PRESSED);
+ addStyleName(CLASSNAME_PRESSED);
+
+ if (BrowserInfo.get().isIE8() || BrowserInfo.get().isIE9()) {
+ /*
+ * We need to prevent the default behavior on these browsers
+ * since user-select is not available.
+ */
+ event.preventDefault();
}
}
break;
// Click ok
disallowNextClick = false;
}
- if (BrowserInfo.get().isIE() || BrowserInfo.get().isOpera()) {
- removeStyleName(CLASSNAME_PRESSED);
- }
+
+ removeStyleName(CLASSNAME_PRESSED);
+
// Explicitly prevent IE 8 from propagating mouseup events
// upward (fixes #6753)
if (BrowserInfo.get().isIE8()) {
if (isCapturing) {
}
setHovering(false);
- if (BrowserInfo.get().isIE() || BrowserInfo.get().isOpera()) {
- removeStyleName(CLASSNAME_PRESSED);
- }
+ removeStyleName(CLASSNAME_PRESSED);
}
break;
case Event.ONBLUR: