Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabs 低版本兼容问题 #7988

Open
1 task
luocong2016 opened this issue Dec 25, 2024 · 3 comments
Open
1 task

Tabs 低版本兼容问题 #7988

luocong2016 opened this issue Dec 25, 2024 · 3 comments
Labels

Comments

@luocong2016
Copy link

luocong2016 commented Dec 25, 2024

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.2.6

Environment

3.5

Reproduction link

https://3x.antdv.com/components/tabs-cn

Steps to reproduce

  1. chrome56 打开tabs
  2. ant-tabs-ink-bar ant-tabs-ink-bar-animated 元素中left 不生效
    image

What is expected?

同其他版本一样 left 生效

What is actually happening?

兼容问题

@luocong2016
Copy link
Author

image

@luocong2016
Copy link
Author

x,y 获取的是NaN

@luocong2016
Copy link
Author

// 兼容处理
const originalGetBoundingClientRect = Element.prototype.getBoundingClientRect;
Element.prototype.getBoundingClientRect = function () {
const rects = originalGetBoundingClientRect.call(this);
rects.x = rects.x || rects.left;
rects.y = rects.y || rects.top;
return rects;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants