antd-mobile 5.41.1-alpha.0 → 5.41.1

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.
@@ -12267,6 +12267,7 @@ const Tabs$1 = (p) => {
12267
12267
  (_a2 = props.onChange) === null || _a2 === void 0 ? void 0 : _a2.call(props, v);
12268
12268
  }
12269
12269
  });
12270
+ const manuallyActiveRef = useRef(null);
12270
12271
  const [{
12271
12272
  x,
12272
12273
  width
@@ -12427,13 +12428,15 @@ const Tabs$1 = (p) => {
12427
12428
  const currentKey = findNextEnabledTab(currentIndex, offsetDirection);
12428
12429
  if (isNext || isPrev) {
12429
12430
  e2.preventDefault();
12431
+ manuallyActiveRef.current = currentKey;
12430
12432
  setActiveKey(currentKey);
12431
12433
  }
12432
12434
  };
12433
12435
  useEffect(() => {
12434
12436
  var _a2;
12435
- if (activeKey && tabRefs.current[activeKey]) {
12437
+ if (activeKey && tabRefs.current[activeKey] && manuallyActiveRef.current === activeKey) {
12436
12438
  (_a2 = tabRefs.current[activeKey]) === null || _a2 === void 0 ? void 0 : _a2.focus();
12439
+ manuallyActiveRef.current = null;
12437
12440
  }
12438
12441
  }, [activeKey]);
12439
12442
  return withNativeProps(props, React__default.createElement("div", {