Reproduction link
Steps to reproduce
The tour component does not highlight the step that is using { behavior: 'smooth'} in scrollIntoViewOptions. It is scrolling to the element but not highlighting the step area.
What is expected?
The step area should not have the mask over.
What is actually happening?
The step area is having a mask over.
| Environment | Info |
| ------------ | ------------ |
| antd | 5.20.2 |
| React | react |
| System | ubantu 22 |
| Browser | Chrome |
8条答案
按热度按时间b1uwtaje1#
Start a new pull request in StackBlitz Codeflow .
1l5u6lss2#
The highlight box cannot move when screen is scrolled or resized
n6lpvg4x3#
@MadCcc has someone picked this issue? I can pick it up if no one is working on it. Please assign it to me
rvpgvaaj4#
@MadCcc I submitted a solution, please review.
kx5bkwkv5#
Is'nt using setTimeout a counter intuitive approach? Wouldn't it cause unexpected behavours? I had also just implemented a solution using IntersectionObserver API and was just about to test it to see if it worked
zzlelutf6#
@Neumann615 Please, check your solution again as it is not working as expected. I tested the changed files in local.
@MadCcc I have submitted a working solution for this bug on react-component/tour repo. Please, check and review.
mzmfm0qo7#
I think the reason for this bug is just that our positioning function conflicts with the browser scrolling animation event, so it's better to find a way to avoid it, and not introduce something extra to calculate or check
kadbb4598#
@MadCcc@abhishekdeepmindz
😑Sorry, I seem to have misconcepted it, but it's been fixed and it should work now.
preview: https://rc-tour.xiaonuo.love/demo/scroll-into-viewhttps://rc-tour.vercel.app/demo/scroll-into-view