Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

wittjosiah/phx-click-bubbling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phx-click events seem to bubble down in unexpected ways. In the following example clicking on the input triggers the event on the div.

<div style="height: 100%; width: 100%; background-color: <%= @color %>;" phx-click="color">
  <input type="text" />
</div>

In order to prevent this an empty phx-click attribute needs to be added to the input

<div style="height: 100%; width: 100%; background-color: <%= @color %>;" phx-click="color">
  <input type="text" phx-click />
</div>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published