emoji-picker-react 4.7.16 → 4.7.17
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/emoji-picker-react.cjs.development.js +15 -11
- package/dist/emoji-picker-react.cjs.development.js.map +1 -1
- package/dist/emoji-picker-react.cjs.production.min.js +1 -1
- package/dist/emoji-picker-react.cjs.production.min.js.map +1 -1
- package/dist/emoji-picker-react.esm.js +15 -11
- package/dist/emoji-picker-react.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/hooks/useEmojiPreviewEvents.ts +19 -14
|
@@ -19604,17 +19604,7 @@ function useEmojiPreviewEvents(allow, setPreviewEmoji) {
|
|
|
19604
19604
|
var belowFoldByPx = detectEmojyPartiallyBelowFold(button, bodyRef);
|
|
19605
19605
|
var buttonHeight = button.getBoundingClientRect().height;
|
|
19606
19606
|
if (belowFoldByPx < buttonHeight / 2) {
|
|
19607
|
-
|
|
19608
|
-
unified = _allUnifiedFromEmojiE2.unified,
|
|
19609
|
-
originalUnified = _allUnifiedFromEmojiE2.originalUnified;
|
|
19610
|
-
if (!unified || !originalUnified) {
|
|
19611
|
-
return;
|
|
19612
|
-
}
|
|
19613
|
-
setPreviewEmoji({
|
|
19614
|
-
unified: unified,
|
|
19615
|
-
originalUnified: originalUnified
|
|
19616
|
-
});
|
|
19617
|
-
return;
|
|
19607
|
+
return handlePartiallyVisibleElementFocus(button, setPreviewEmoji);
|
|
19618
19608
|
}
|
|
19619
19609
|
if (belowFoldByPx < buttonHeight) {
|
|
19620
19610
|
button.scrollIntoView({
|
|
@@ -19635,6 +19625,20 @@ function useEmojiPreviewEvents(allow, setPreviewEmoji) {
|
|
|
19635
19625
|
};
|
|
19636
19626
|
}, [BodyRef, allow, setPreviewEmoji, isMouseDisallowed, allowMouseMove]);
|
|
19637
19627
|
}
|
|
19628
|
+
function handlePartiallyVisibleElementFocus(button, setPreviewEmoji) {
|
|
19629
|
+
var _document$activeEleme;
|
|
19630
|
+
var _allUnifiedFromEmojiE2 = allUnifiedFromEmojiElement(button),
|
|
19631
|
+
unified = _allUnifiedFromEmojiE2.unified,
|
|
19632
|
+
originalUnified = _allUnifiedFromEmojiE2.originalUnified;
|
|
19633
|
+
if (!unified || !originalUnified) {
|
|
19634
|
+
return;
|
|
19635
|
+
}
|
|
19636
|
+
(_document$activeEleme = document.activeElement) == null ? void 0 : _document$activeEleme.blur == null ? void 0 : _document$activeEleme.blur();
|
|
19637
|
+
setPreviewEmoji({
|
|
19638
|
+
unified: unified,
|
|
19639
|
+
originalUnified: originalUnified
|
|
19640
|
+
});
|
|
19641
|
+
}
|
|
19638
19642
|
|
|
19639
19643
|
var _stylesheet$create;
|
|
19640
19644
|
var FlexDirection;
|