@mirohq/design-system-use-press
Advanced tools
Comparing version 0.2.4-toolbar-item-use-press.0 to 0.3.0-toolbar-item-use-press.0
@@ -16,9 +16,10 @@ 'use strict'; | ||
}) => { | ||
if (!disabled) { | ||
if (!preventFocusOnPress) { | ||
utils.focusWithoutScrolling(target); | ||
} else if (document.activeElement !== target) { | ||
document.activeElement.blur(); | ||
} | ||
if (disabled) { | ||
return; | ||
} | ||
if (preventFocusOnPress) { | ||
target.blur(); | ||
} else { | ||
utils.focusWithoutScrolling(target); | ||
} | ||
}; | ||
@@ -25,0 +26,0 @@ |
@@ -12,9 +12,10 @@ import { useRef, useState, useEffect } from 'react'; | ||
}) => { | ||
if (!disabled) { | ||
if (!preventFocusOnPress) { | ||
focusWithoutScrolling(target); | ||
} else if (document.activeElement !== target) { | ||
document.activeElement.blur(); | ||
} | ||
if (disabled) { | ||
return; | ||
} | ||
if (preventFocusOnPress) { | ||
target.blur(); | ||
} else { | ||
focusWithoutScrolling(target); | ||
} | ||
}; | ||
@@ -21,0 +22,0 @@ |
{ | ||
"name": "@mirohq/design-system-use-press", | ||
"version": "0.2.4-toolbar-item-use-press.0", | ||
"version": "0.3.0-toolbar-item-use-press.0", | ||
"description": "", | ||
@@ -30,4 +30,4 @@ "author": "Miro", | ||
"@mirohq/design-system-use-listeners": "^0.1.1", | ||
"@mirohq/design-system-use-logger": "^0.1.6", | ||
"@mirohq/design-system-utils": "^0.14.3" | ||
"@mirohq/design-system-utils": "^0.14.3", | ||
"@mirohq/design-system-use-logger": "^0.1.6" | ||
}, | ||
@@ -34,0 +34,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1679
167639