You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browsers you attempted to reproduce this bug on (the more the merrier): Chrome
Does the problem persist after removing "assets/node_modules" and trying again? Yes/no: Yes
Actual behavior
👋🏼 I have a sliding panel component with an embedded live view and a form containing an autocomplete component. The autocomplete component has a phx-click-away binding that pushes an event to empty the options list, removing them. If I type anything in this component, it shows the matching options as expected, and if I click anywhere inside the panel, it hides them. However, the sidepanel has a semi-transparent overlay that patches the view, removing it if you click on it. In this case, it throws the following error in the browser:
It's trying to push the event to the component, but since clicking on the panel's overlay removes it from the DOM, the event's target no longer exists. Moreover, if there are other live components on the parent live view, like a table of items in which each row is a live component, the phx-click-away gets intercepted by the corresponding index component, throwing the following error:
phx-click-away events should check if the target exists before pushing the event, or somehow scope the target index/id to the rendering live view. Does it make any sense?
The text was updated successfully, but these errors were encountered:
Environment
Actual behavior
👋🏼 I have a sliding panel component with an embedded live view and a form containing an autocomplete component. The autocomplete component has a
phx-click-away
binding that pushes an event to empty the options list, removing them. If I type anything in this component, it shows the matching options as expected, and if I click anywhere inside the panel, it hides them. However, the sidepanel has a semi-transparent overlay that patches the view, removing it if you click on it. In this case, it throws the following error in the browser:It's trying to push the event to the component, but since clicking on the panel's overlay removes it from the DOM, the event's target no longer exists. Moreover, if there are other live components on the parent live view, like a table of items in which each row is a live component, the
phx-click-away
gets intercepted by the corresponding index component, throwing the following error:Expected behavior
phx-click-away
events should check if the target exists before pushing the event, or somehow scope the target index/id to the rendering live view. Does it make any sense?The text was updated successfully, but these errors were encountered: