Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

plans: Ensure linked comparison tables scroll into view.

Karl Stolley7ea313c65819
diff --git a/web/src/portico/landing-page.js b/web/src/portico/landing-page.js
index 2e395b69cad..134a4a2191b 100644
--- a/web/src/portico/landing-page.js
+++ b/web/src/portico/landing-page.js
@@ -154,6 +154,11 @@ $(() => {
// table, but when it's present, make sure to align the
// comparison table with the current active plans tab
if ($comparison_table.length > 0) {
+ // Make sure that links coming from elsewhere scroll
+ // to the comparison table
+ if (target_hash.includes("plan-comparison")) {
+ document.querySelector(target_hash).scrollIntoView();
+ }
const plans_columns_count = tab_to_show.slice(1) === "self-hosted" ? 4 : 3;
// Set the correct values for span and colspan