@codacy/ui-components 0.58.3 → 0.58.4

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.
@@ -11,7 +11,7 @@ export var useDropdownTrigger = function useDropdownTrigger() {
11
11
  var handleSurroundings = useCallback(function (event) {
12
12
  var _dropdownContext$trig, _dropdownContext$pane;
13
13
 
14
- if (!((_dropdownContext$trig = dropdownContext.triggerRef) === null || _dropdownContext$trig === void 0 ? void 0 : _dropdownContext$trig.contains(event.target)) && !((_dropdownContext$pane = dropdownContext.panelRef) === null || _dropdownContext$pane === void 0 ? void 0 : _dropdownContext$pane.contains(event.target))) {
14
+ if (event.target.clientWidth && !((_dropdownContext$trig = dropdownContext.triggerRef) === null || _dropdownContext$trig === void 0 ? void 0 : _dropdownContext$trig.contains(event.target)) && !((_dropdownContext$pane = dropdownContext.panelRef) === null || _dropdownContext$pane === void 0 ? void 0 : _dropdownContext$pane.contains(event.target))) {
15
15
  dropdownContext.setOpen(false);
16
16
  }
17
17
  }, [dropdownContext]);
@@ -35,7 +35,7 @@ export var useDropdownTrigger = function useDropdownTrigger() {
35
35
 
36
36
  if (dropdownContext.open) subscribe();else unsubscribe();
37
37
  return unsubscribe;
38
- }, [dropdownContext, dropdownContext.panelRef, handleEscape, handleSurroundings]);
38
+ }, [dropdownContext.open, dropdownContext.panelRef, dropdownContext.triggerRef, handleEscape, handleSurroundings]);
39
39
  return _objectSpread(_objectSpread({}, dropdownContext), {}, {
40
40
  onClick: onClick
41
41
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/ui-components",
3
- "version": "0.58.3",
3
+ "version": "0.58.4",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",