MCPcopy Create free account
hub / github.com/microsoft/SandDance / shouldPreventMouseEvent

Function shouldPreventMouseEvent

docs/external/js/react-dom.development.js:8231–8249  ·  view source on GitHub ↗
(name, type, props)

Source from the content-addressed store, hash-verified

8229 }
8230
8231 function shouldPreventMouseEvent(name, type, props) {
8232 switch (name) {
8233 case 'onClick':
8234 case 'onClickCapture':
8235 case 'onDoubleClick':
8236 case 'onDoubleClickCapture':
8237 case 'onMouseDown':
8238 case 'onMouseDownCapture':
8239 case 'onMouseMove':
8240 case 'onMouseMoveCapture':
8241 case 'onMouseUp':
8242 case 'onMouseUpCapture':
8243 case 'onMouseEnter':
8244 return !!(props.disabled && isInteractive(type));
8245
8246 default:
8247 return false;
8248 }
8249 }
8250 /**
8251 * @param {object} inst The instance, which is the source of events.
8252 * @param {string} registrationName Name of listener (e.g. `onClick`).

Callers 1

getListenerFunction · 0.85

Calls 1

isInteractiveFunction · 0.85

Tested by

no test coverage detected