@douyinfe/semi-foundation 2.38.3-alpha.2-patch-table → 2.38.3-alpha.2-patch-table-datepicker

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.
@@ -1361,7 +1361,14 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
1361
1361
 
1362
1362
  handlePanelVisibleChange(visible: boolean) {
1363
1363
  if (visible) {
1364
- this._adapter.setInsetInputFocus();
1364
+ // this is a hack for macOS + Chrome
1365
+ // for internal use only
1366
+ setTimeout(() => {
1367
+ this._adapter.setInsetInputFocus();
1368
+ // 100 is a magic number
1369
+ // <10 is not ok
1370
+ // >= 10 is ok
1371
+ }, 100);
1365
1372
  /**
1366
1373
  * After the panel is closed, the trigger input is disabled
1367
1374
  * 面板关闭后,trigger input 禁用
@@ -1183,7 +1183,14 @@ class DatePickerFoundation extends _foundation.default {
1183
1183
  }
1184
1184
  handlePanelVisibleChange(visible) {
1185
1185
  if (visible) {
1186
- this._adapter.setInsetInputFocus();
1186
+ // this is a hack for macOS + Chrome
1187
+ // for internal use only
1188
+ setTimeout(() => {
1189
+ this._adapter.setInsetInputFocus();
1190
+ // 100 is a magic number
1191
+ // <10 is not ok
1192
+ // >= 10 is ok
1193
+ }, 100);
1187
1194
  /**
1188
1195
  * After the panel is closed, the trigger input is disabled
1189
1196
  * 面板关闭后,trigger input 禁用
@@ -1175,7 +1175,14 @@ export default class DatePickerFoundation extends BaseFoundation {
1175
1175
  }
1176
1176
  handlePanelVisibleChange(visible) {
1177
1177
  if (visible) {
1178
- this._adapter.setInsetInputFocus();
1178
+ // this is a hack for macOS + Chrome
1179
+ // for internal use only
1180
+ setTimeout(() => {
1181
+ this._adapter.setInsetInputFocus();
1182
+ // 100 is a magic number
1183
+ // <10 is not ok
1184
+ // >= 10 is ok
1185
+ }, 100);
1179
1186
  /**
1180
1187
  * After the panel is closed, the trigger input is disabled
1181
1188
  * 面板关闭后,trigger input 禁用
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.38.3-alpha.2-patch-table",
3
+ "version": "2.38.3-alpha.2-patch-table-datepicker",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build:lib": "node ./scripts/compileLib.js",
7
7
  "prepublishOnly": "npm run build:lib"
8
8
  },
9
9
  "dependencies": {
10
- "@douyinfe/semi-animation": "2.38.3-alpha.2-patch-table",
10
+ "@douyinfe/semi-animation": "2.38.3-alpha.2-patch-table-datepicker",
11
11
  "async-validator": "^3.5.0",
12
12
  "classnames": "^2.2.6",
13
13
  "date-fns": "^2.29.3",
@@ -23,7 +23,7 @@
23
23
  "*.scss",
24
24
  "*.css"
25
25
  ],
26
- "gitHead": "e7ebe0a98addd752aac881ed6aece65f9c917180",
26
+ "gitHead": "a6c184520545392a4f764f1ffdae16483118c72c",
27
27
  "devDependencies": {
28
28
  "@babel/plugin-transform-runtime": "^7.15.8",
29
29
  "@babel/preset-env": "^7.15.8",