[PR #15963] [MERGED] Fixes #15961: Fix secret toggle button by avoiding duplicate event handler #14736

Closed
opened 2025-12-29 23:26:22 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15963
Author: @jeremystretch
Created: 5/6/2024
Status: Merged
Merged: 5/6/2024
Merged by: @jeremystretch

Base: developHead: 15961-fix-secret-toggle


📝 Commits (1)

  • 4becede Fixes #15961: Fix secret toggle button by avoiding duplicate event handler

📊 Changes

3 files changed (+16 additions, -17 deletions)

View changed files

📝 netbox/project-static/dist/netbox.js (+9 -9)
📝 netbox/project-static/dist/netbox.js.map (+1 -1)
📝 netbox/project-static/src/buttons/secretToggle.ts (+6 -7)

📄 Description

Fixes: #15961

  • Move the callback for .toggle-secret buttons to a named function
  • Call .removeEventHandler() on the element prior to adding the event handler to avoid duplicate registrations

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/15963 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 5/6/2024 **Status:** ✅ Merged **Merged:** 5/6/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `15961-fix-secret-toggle` --- ### 📝 Commits (1) - [`4becede`](https://github.com/netbox-community/netbox/commit/4becede5e966aaae72ed2de8e7946351b6c5439a) Fixes #15961: Fix secret toggle button by avoiding duplicate event handler ### 📊 Changes **3 files changed** (+16 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `netbox/project-static/dist/netbox.js` (+9 -9) 📝 `netbox/project-static/dist/netbox.js.map` (+1 -1) 📝 `netbox/project-static/src/buttons/secretToggle.ts` (+6 -7) </details> ### 📄 Description ### Fixes: #15961 - Move the callback for `.toggle-secret` buttons to a named function - Call `.removeEventHandler()` on the element prior to adding the event handler to avoid duplicate registrations --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:26:22 +01:00
adam closed this issue 2025-12-29 23:26:22 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14736