We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99bd437 commit 394a0adCopy full SHA for 394a0ad
app/views/messages/created.js.erb
@@ -1,4 +1,5 @@
1
<% if @message.persisted? %>
2
+ tinyMCE.remove()
3
$('#messages-new-partial')
4
.before("<%= j(render 'messages/message', message: @message, thread: @thread ) %>")
5
.html("<%= j(render 'messages/new') %>")
@@ -10,6 +11,11 @@
10
11
el.scrollIntoView()
12
window.scrollBy(0, -80) // Top fix header
13
$(el).parent().addClass("new-message-highlight")
14
+ // Without a setTimeout tinyMCE has a bug where in initializes
15
+ // but it has no container so the editor is not selectable in FireFox.
16
+ setTimeout(function() {
17
+ tinyMCE.init(window.tinymceOpts)
18
+ }, 1)
19
<% end %>
20
<%= render 'shared/flash' %>
21
<% if flash[:alert].present? %>
0 commit comments