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
I have a Trix editor sitting in a dialog modal. The dialog is configured to close when a user clicks outside of the dialog content. When a user clicks the "Attach Files" button in the Trix toolbar, my dialog closes.
Looking at the Trix file input config, it appears that clicking "Attach Files" appends an <input type="file"> to the DOM <body> and then triggers a click on the input, thus causing my dialog to close.
If the <input type="file"> were instead inserted as a sibling of the <trix-editor> element my modal wouldn't break. Alternatively, if the Trix file input config could allow for changing where the <input type="file"> element is inserted into the DOM that would provide a solution to my issue as well.
The text was updated successfully, but these errors were encountered:
I have a Trix editor sitting in a dialog modal. The dialog is configured to close when a user clicks outside of the dialog content. When a user clicks the "Attach Files" button in the Trix toolbar, my dialog closes.
Looking at the Trix file input config, it appears that clicking "Attach Files" appends an
<input type="file">
to the DOM<body>
and then triggers aclick
on the input, thus causing my dialog to close.If the
<input type="file">
were instead inserted as a sibling of the<trix-editor>
element my modal wouldn't break. Alternatively, if the Trix file input config could allow for changing where the<input type="file">
element is inserted into the DOM that would provide a solution to my issue as well.The text was updated successfully, but these errors were encountered: