@qwanyx/carousel 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -0
- package/dist/index.mjs +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -893,6 +893,9 @@ var Carousel = (0, import_react4.forwardRef)(
|
|
|
893
893
|
(0, import_react4.useEffect)(() => {
|
|
894
894
|
if (!nav.keyboard) return;
|
|
895
895
|
const handleKeyDown = (e) => {
|
|
896
|
+
const target = e.target;
|
|
897
|
+
const isFormElement = target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.tagName === "SELECT" || target.isContentEditable;
|
|
898
|
+
if (isFormElement) return;
|
|
896
899
|
switch (e.key) {
|
|
897
900
|
case "ArrowRight":
|
|
898
901
|
case "ArrowDown":
|
package/dist/index.mjs
CHANGED
|
@@ -858,6 +858,9 @@ var Carousel = forwardRef(
|
|
|
858
858
|
useEffect3(() => {
|
|
859
859
|
if (!nav.keyboard) return;
|
|
860
860
|
const handleKeyDown = (e) => {
|
|
861
|
+
const target = e.target;
|
|
862
|
+
const isFormElement = target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.tagName === "SELECT" || target.isContentEditable;
|
|
863
|
+
if (isFormElement) return;
|
|
861
864
|
switch (e.key) {
|
|
862
865
|
case "ArrowRight":
|
|
863
866
|
case "ArrowDown":
|