瀏覽代碼

fix: fix the problem that the automatic adjustment position is incorrect when the position is topleft (#1344)

YannLynn 2 年之前
父節點
當前提交
466b9ef99a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/semi-foundation/tooltip/foundation.ts

+ 1 - 1
packages/semi-foundation/tooltip/foundation.ts

@@ -855,7 +855,7 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
                         position = this._adjustPos(position, true);
                         position = this._adjustPos(position, true);
                     }
                     }
                     if (shouldReverseLeftSide && widthIsBigger) {
                     if (shouldReverseLeftSide && widthIsBigger) {
-                        position = this._adjustPos(position, true);
+                        position = this._adjustPos(position);
                     }
                     }
                     if (isWidthOverFlow && (isViewXEnoughSideHalf || isContainerXEnoughSideHalf)) {
                     if (isWidthOverFlow && (isViewXEnoughSideHalf || isContainerXEnoughSideHalf)) {
                         position = this._adjustPos(position, true, 'reduce');
                         position = this._adjustPos(position, true, 'reduce');