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.

playground_popover: Update external code btn behavior on setting change.

Sayam Samal3fda65c37d54
diff --git a/web/src/playground_links_popover.ts b/web/src/playground_links_popover.ts
index f6eff373f7b..0b5f2439df9 100644
--- a/web/src/playground_links_popover.ts
+++ b/web/src/playground_links_popover.ts
@@ -122,6 +122,10 @@ function register_click_handlers(): void {
url_template.expand({code: extracted_code}),
);
} else {
+ // Remove the href attribute that was set when there was only
+ // one playground link, so that it doesn't interfere with the
+ // popover toggle when multiple playground links exist.
+ $view_in_playground_button.removeAttr("href");
const playground_store = new Map<number, RealmPlaygroundWithURL>();
for (const playground of playground_info) {
const url_template = url_template_lib.parse(playground.url_template);