Skip to content
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

button with popovertarget not triggering in form (Safari 17) #1245

Open
leevigraham opened this issue Apr 17, 2024 · 0 comments
Open

button with popovertarget not triggering in form (Safari 17) #1245

leevigraham opened this issue Apr 17, 2024 · 0 comments

Comments

@leevigraham
Copy link

Given the following code (https://codepen.io/leevigraham/pen/RwOYEGM):

<script src="https://www.skypack.dev/view/@hotwired/turbo"></script>
<form>
  <button  type="button" popovertarget="test">Pop in a form</button>
  <div id="test" popover>Test</div>
</form>

<button  type="button" popovertarget="test2">Pop not a form</button>
<div id="test2" popover>Test2</div>

In Safari (Version 17.3.1) The button in the form does not trigger the popover.

My guess is the turbo form is catching the button event and not allowing it to bubble up to the browser.

Firefox and Chrome work as expected.

@leevigraham leevigraham changed the title button with popovertarget not triggering in form button with popovertarget not triggering in form (Safari 17) Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant