The dropdown is not working after updating navbar content using HTMX #39880
Replies: 2 comments 2 replies
-
Yes, it might be really difficult to spot the issue without any reproducible minimal env TBH. |
Beta Was this translation helpful? Give feedback.
-
I started to figure out how to reproduce it. I will make a video but first, let me explain what happens and how to reproduce this. So I have some HTML that looks like this <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
<link rel="stylesheet" href="{% static 'css/style.css' %}">
<link rel="stylesheet" href="{% static 'css/pretty-checkbox.min.css' %}">
<title>My Coffee</title>
</head>
<body class="min-vh-100 d-flex flex-column">
the navbar
<div id="content" hx-history-elt>
The main content goes here
</div>
the footer
</body>
</html> and ignore the {%%} it's related to the Django template language. But just here is the main thing, my server returns some HTML content that will be added in the div with the id equal to Recording.2024-04-11.193744-2.mp4 |
Beta Was this translation helpful? Give feedback.
-
Describe the issue
So I am building a website using HTMX for the frontend so that the website look like the SPA applications. But sometime I might need to update the navbar content in case if the user logged in as it will require me the signup to logout link. But after doing this I can't open the dropdown anymore. and I have a video to show you what is going on. I wanted to make a video with some bigger details but github might not allow it because of the size.
Recording.2024-04-08.140601-2.mp4
And as you see I can't just open it any more.
And here is the navbar code
Reduced test cases
This might be hard because sometimes I do the same thing and it works Ok and sometimes it doesn't. so that why I don't think that it might be easy. and also as I am working on a backend it doesn't seem that there is some way to reproduce the error in codepen.
What operating system(s) are you seeing the problem on?
The code is in the WSL but the browser is in windows.
What browser(s) are you seeing the problem on?
Chrome
What version of Bootstrap are you using?
4.4.1
Beta Was this translation helpful? Give feedback.
All reactions