@embeddables/cli 0.7.4 → 0.7.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.
@@ -45,7 +45,7 @@ export function PageNavigator({ embeddableId }) {
45
45
  window.addEventListener(USERDATA_UPDATED_EVENT, handler);
46
46
  return () => window.removeEventListener(USERDATA_UPDATED_EVENT, handler);
47
47
  }, [embeddableId, refresh]);
48
- // Close dropdown when clicking outside
48
+ // Close dropdown when clicking outside (use 'click' so selecting a page item fires its onClick before we consider closing)
49
49
  useEffect(() => {
50
50
  const handleClickOutside = (event) => {
51
51
  if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
@@ -53,8 +53,8 @@ export function PageNavigator({ embeddableId }) {
53
53
  }
54
54
  };
55
55
  if (isDropdownOpen) {
56
- document.addEventListener('mousedown', handleClickOutside);
57
- return () => document.removeEventListener('mousedown', handleClickOutside);
56
+ document.addEventListener('click', handleClickOutside);
57
+ return () => document.removeEventListener('click', handleClickOutside);
58
58
  }
59
59
  }, [isDropdownOpen]);
60
60
  // Scroll to current page when dropdown opens
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embeddables/cli",
3
- "version": "0.7.4",
3
+ "version": "0.7.5",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "embeddables": "./bin/embeddables.mjs"