Skip to content
Snippets Groups Projects
Commit 1c6f421e authored by Timothee P's avatar Timothee P :sunflower:
Browse files

fix regression from id revert on e3e37620 to scroll on messages

parent 579e06e6
No related branches found
No related tags found
No related merge requests found
...@@ -101,7 +101,7 @@ export default new Vuex.Store({ ...@@ -101,7 +101,7 @@ export default new Vuex.Store({
}, },
DISPLAY_MESSAGE(state, comment) { DISPLAY_MESSAGE(state, comment) {
state.messages = [{ comment }, ...state.messages]; state.messages = [{ comment }, ...state.messages];
document.getElementById("messages").scrollIntoView({ block: "start", inline: "nearest" }); if (document.getElementById("content")) document.getElementById("content").scrollIntoView({ block: "start", inline: "nearest" });
setTimeout(() => { setTimeout(() => {
state.messages = []; state.messages = [];
}, 3000); }, 3000);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment