fix: Don't AutoScroll to embed when multiple-duration event's booking page is embedded (#16411)

* Fix and add test and eslint rule

* Fix eslint errors

---------

Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
Hariom BalharaandPeer Richelsen authored and GitHub committed 2024-09-27 09:57:04 +05:30
1 parent 38fa0fae1d
commit d836497d56
17 files changed
+129 -21

No files matched your search

@@ -47,6 +47,7 @@ export default function CancelBooking(props: Props) {
const cancelBookingRef = useCallback((node: HTMLTextAreaElement) => {
if (node !== null) {
// eslint-disable-next-line @calcom/eslint/no-scroll-into-view-embed -- CancelBooking is not usually used in embed mode
node.scrollIntoView({ behavior: "smooth" });
node.focus();
}
+6
View File
@@ -292,6 +292,12 @@ export const createUsersFixture = (
{ title: "Paid", slug: "paid", length: 30, price: 1000 },
{ title: "Opt in", slug: "opt-in", requiresConfirmation: true, length: 30 },
{ title: "Seated", slug: "seated", seatsPerTimeSlot: 2, length: 30 },
{
title: "Multiple duration",
slug: "multiple-duration",
length: 30,
metadata: { multipleDuration: [30, 60, 90] },
},
];
if (opts?.eventTypes) defaultEventTypes = defaultEventTypes.concat(opts.eventTypes);