Allow scroll when user selects a date (#22313)
This commit is contained in:
1 parent
076afdc00e
commit
4843658dfb
1 file changed
+2
-2
@@ -155,8 +155,8 @@ const BookerComponent = ({
|
|||||||
|
|
||||||
const scrolledToTimeslotsOnce = useRef(false);
|
const scrolledToTimeslotsOnce = useRef(false);
|
||||||
const scrollToTimeSlots = () => {
|
const scrollToTimeSlots = () => {
|
||||||
if (isMobile && !isEmbed && !scrolledToTimeslotsOnce.current) {
|
if (isMobile && !scrolledToTimeslotsOnce.current) {
|
||||||
// eslint-disable-next-line @calcom/eslint/no-scroll-into-view-embed -- Conditional within !isEmbed condition
|
// eslint-disable-next-line @calcom/eslint/no-scroll-into-view-embed -- We are allowing it here because scrollToTimeSlots is called on explicit user action where it makes sense to scroll, remember that the goal is to not do auto-scroll on embed load because that ends up scrolling the embedding webpage too
|
||||||
timeslotsRef.current?.scrollIntoView({ behavior: "smooth" });
|
timeslotsRef.current?.scrollIntoView({ behavior: "smooth" });
|
||||||
scrolledToTimeslotsOnce.current = true;
|
scrolledToTimeslotsOnce.current = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user