MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / removeUserSelectStyles

Function removeUserSelectStyles

console/src/hooks/useDrag.ts:38–47  ·  view source on GitHub ↗
(doc?: Document)

Source from the content-addressed store, hash-verified

36}
37
38export function removeUserSelectStyles(doc?: Document) {
39 if (!doc) return;
40 if (doc.body) {
41 doc.body.classList.remove("use-drag-transparent-selection");
42 }
43 const selection = (doc.defaultView || window).getSelection();
44 if (selection && selection.type !== "Caret") {
45 selection.removeAllRanges();
46 }
47}
48
49function createDraggableEvent({
50 curPoint,

Callers 1

useDragFunction · 0.85

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected