diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index 72512a0..948618c 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -100,3 +100,4 @@ if (acceptButton) { document.getElementById('chat-room-id').value = chatRoomId }) } + diff --git a/app/javascript/packs/webrtc.js b/app/javascript/packs/webrtc.js index fd787df..e1d83e3 100644 --- a/app/javascript/packs/webrtc.js +++ b/app/javascript/packs/webrtc.js @@ -220,3 +220,18 @@ setTimeout(function() { window.__proto__.reload = () => { window.location = window.location } })(); + +// // have enter with JS +// const form = document.getElementById("chat-form") +// document.getElementById("chat-input").addEventListener("keyup", event => { +// if(event == "Enter"){ +// form.submit(); +// } +// }); + + +document.getElementById("chat-form").addEventListener("click", function(event){ + event.preventDefault() +}); + + diff --git a/app/views/chat_rooms/show.html.erb b/app/views/chat_rooms/show.html.erb index b05b468..689b6d1 100644 --- a/app/views/chat_rooms/show.html.erb +++ b/app/views/chat_rooms/show.html.erb @@ -28,14 +28,16 @@ <% end %> - - - - - - - - +
+ + + + + + + + +