-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Remove inline JS event handler from NavMenu component in Blazor Web App template #63828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
91d251b
1986110
3749489
e6b5efc
22c61a6
24c9f8f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you check the different template configurations to make sure we are only adding this when needed? I imagine it'll be something in
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot confirm this with me.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've verified the template configurations. The JS file is already correctly handled by the existing template.json:
Tested across all configurations: ✅ Server default, ✅ WebAssembly + global, ✅ None interactivity, ✅ Empty template. Fixed in commit 3749489. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| // Handle navigation menu toggle | ||
| const navScrollable = document.getElementById("nav-scrollable"); | ||
| const navToggler = document.querySelector(".navbar-toggler"); | ||
|
|
||
| if (navScrollable && navToggler) { | ||
| navScrollable.addEventListener("click", function() { | ||
pavelsavara marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| navToggler.click(); | ||
| }); | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.