mirror of https://github.com/zulip/zulip.git
playground_popover: Update external code btn behavior on setting change.
This commit removes the `href` attribute from the external code button when multiple code playground links are present for a language. This prevents the bug where the external code button would always link to the previously set code playground link, even when multiple links are added and the expected behavior is to show the popover.
This commit is contained in:
parent
5191a80a3a
commit
3fda65c37d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue