Closed fabiospampinato closed 1 year ago
Somehow one of these input modals survived restarting Phoenix for me, so I can't close it anymore 🤔
Edit: it seems to survive a reload if Phoenix reloads itself, but it seems to close itself correctly if I call Phoenix.reload
manually myself. Though it doesn't behave consistently, so maybe I'm seeing a pattern that doesn't exist.
Edit: also each time I open a new modal at the same coordinates it opens slightly offset from the point I set, which seems symptomatic of some other, possibly related, bug.
@fabiospampinato Hi, thanks for the report! After debugging this looks to me as a memory management issue. I clarified the documentation that you must always keep a reference for the modal to stay active. Otherwise the callback for text changes will not get called once it gets released in the background.
To avoid mistakes, I also changed it so that Modal#show()
will return the modal itself for chaining. Finally, there was an issue that the window was not getting closed properly when it got deallocated from the JavaScript context. This should also now be fixed.
With the following code I see two problems:
textDidChange
events are still no longer fired.