Skip to content

Commit 78126d0

Browse files
author
Mattia Roccoberton
committed
Fix editor loading with Turbolinks
1 parent 3190134 commit 78126d0

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

app/assets/javascripts/activeadmin/quill_editor_input.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,7 @@
8585
}
8686

8787
// --- events ------------------------------------------------------------------
88-
$(document).ready(() => {
89-
initQuillEditors()
90-
})
91-
92-
$(document).on('has_many_add:after', '.has_many_container', () => {
93-
initQuillEditors()
94-
})
88+
$(document).ready(initQuillEditors)
89+
$(document).on('has_many_add:after', '.has_many_container', initQuillEditors)
90+
$(document).on('turbolinks:load', initQuillEditors)
9591
})()

0 commit comments

Comments
 (0)