@nokecy/qc-ui 1.1.70 → 1.1.71

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.
@@ -8,7 +8,10 @@ var _react = require("react");
8
8
  // setSelectionRange 仅 textarea 与 text/search/url/tel/password 类型 input 支持;
9
9
  // checkbox/number/date 等调用会抛 InvalidStateError,故用白名单守卫。@author nokecy
10
10
  var supportsSelectionRange = function supportsSelectionRange(el) {
11
- return el.tagName === 'TEXTAREA' || /^(text|search|url|tel|password)$/i.test(el.type || 'text');
11
+ return (
12
+ // 日期组件自行管理光标和分段选区,表格只聚焦,不覆盖其选区。@author nokecy
13
+ !el.closest('.ant-picker') && (el.tagName === 'TEXTAREA' || /^(text|search|url|tel|password)$/i.test(el.type || 'text'))
14
+ );
12
15
  };
13
16
 
14
17
  /**
@@ -2,7 +2,10 @@ import { useCallback } from 'react';
2
2
  // setSelectionRange 仅 textarea 与 text/search/url/tel/password 类型 input 支持;
3
3
  // checkbox/number/date 等调用会抛 InvalidStateError,故用白名单守卫。@author nokecy
4
4
  var supportsSelectionRange = function supportsSelectionRange(el) {
5
- return el.tagName === 'TEXTAREA' || /^(text|search|url|tel|password)$/i.test(el.type || 'text');
5
+ return (
6
+ // 日期组件自行管理光标和分段选区,表格只聚焦,不覆盖其选区。@author nokecy
7
+ !el.closest('.ant-picker') && (el.tagName === 'TEXTAREA' || /^(text|search|url|tel|password)$/i.test(el.type || 'text'))
8
+ );
6
9
  };
7
10
 
8
11
  /**