@dvrd/dvr-controls 1.1.25 → 1.1.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dvrd/dvr-controls",
3
- "version": "1.1.25",
3
+ "version": "1.1.26",
4
4
  "description": "Custom web controls",
5
5
  "main": "index.ts",
6
6
  "files": [
@@ -3,10 +3,10 @@
3
3
  */
4
4
 
5
5
  import './style/withBackground.scss';
6
+ import classNames from 'classnames';
6
7
 
7
8
  import React, {CSSProperties, PropsWithChildren, useEffect, useMemo, useRef} from 'react';
8
- import classNames from 'classnames';
9
- import {escapePressed, hasHover} from "../util/controlUtil";
9
+ import {escapePressed} from '../util/controlUtil';
10
10
 
11
11
  interface Props {
12
12
  onClickBackground?: Function,
@@ -39,7 +39,7 @@ export default function WithBackground(props: PropsWithChildren<Props>) {
39
39
  function _onClickBackground(evt: React.MouseEvent) {
40
40
  if (preventBackgroundClick) return;
41
41
  if (onClickBackground) onClickBackground(evt);
42
- else if (!hasHover(contentRef.current)) onClose(evt);
42
+ else if (evt.target === evt.currentTarget) onClose(evt);
43
43
  }
44
44
 
45
45
  function onKeyDown(evt: KeyboardEvent) {