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

Closed
1 task
luocong2016 opened this issue Dec 25, 2024 · 4 comments
Closed
1 task

Tabs 低版本兼容问题 #7988

luocong2016 opened this issue Dec 25, 2024 · 4 comments

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;
}

Copy link

github-actions bot commented Mar 7, 2025

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

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

No branches or pull requests

2 participants