turbo-modal-dialog demo
Every page here is plain static HTML, the same markup a Rails app would render. A service worker stands in for the server and receives the form submissions.
- Scroll partway down the list and open “Edit”. The address bar changes to
/products/…/edit. - Close it with the browser’s back button, and reopen it with forward.
- Clear the name and save. The error shows inside the modal.
- Save valid values. The modal closes, the list updates, and the scroll position stays.
- Open “Edit” in another tab, or reload while it is open. It opens as a modal.
- The product name links to the detail page, which is an ordinary page.
Saved changes are kept in this tab only and are gone when you close it.
Compare the five modal_style values, which set the size of a modal, on the modal_style examples page.