From 68effaa5c38067a7ce91af1c7ca05ec3251eca25 Mon Sep 17 00:00:00 2001 From: Max G Date: Fri, 3 Jan 2020 01:54:11 +0000 Subject: [PATCH] Some minor bug fixing --- client/src/components/NoteDeleteButtonComponent.vue | 1 - client/src/components/NoteInputPanel.vue | 4 ++-- client/src/pages/NotesPage.vue | 7 ++++--- server/models/Note.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/src/components/NoteDeleteButtonComponent.vue b/client/src/components/NoteDeleteButtonComponent.vue index ada8122..48dc7e2 100644 --- a/client/src/components/NoteDeleteButtonComponent.vue +++ b/client/src/components/NoteDeleteButtonComponent.vue @@ -29,7 +29,6 @@ axios.post('/api/note/delete', {'noteId':this.noteId}).then(response => { if(response.data == true){ - console.log('Lets delete this note!') this.$bus.$emit('note_deleted', this.noteId) } }) diff --git a/client/src/components/NoteInputPanel.vue b/client/src/components/NoteInputPanel.vue index b2554a8..dc1ecd2 100644 --- a/client/src/components/NoteInputPanel.vue +++ b/client/src/components/NoteInputPanel.vue @@ -147,8 +147,8 @@ document.removeEventListener('visibilitychange', this.visibiltyChangeAction) - this.$off() // Remove all event listeners - this.$bus.$off() + // this.$off() // Remove all event listeners + // this.$bus.$off() //Trash editor instance on close this.tinymce.remove() diff --git a/client/src/pages/NotesPage.vue b/client/src/pages/NotesPage.vue index ffe922e..67e677b 100644 --- a/client/src/pages/NotesPage.vue +++ b/client/src/pages/NotesPage.vue @@ -249,12 +249,13 @@ }, beforeDestroy(){ - console.log('Unbinging all events') window.removeEventListener('scroll', this.onScroll) window.removeEventListener('hashchange', this.hashChangeAction) document.removeEventListener('visibilitychange', this.visibiltyChangeAction) - this.$off() // Remove all event listeners - this.$bus.$off() + + //We want to remove event listeners, but something here is messing them up and preventing ALL event listeners from working + // this.$off() // Remove all event listeners + // this.$bus.$off() }, mounted() { //Loads initial batch and tags diff --git a/server/models/Note.js b/server/models/Note.js index 6d24a79..141c629 100644 --- a/server/models/Note.js +++ b/server/models/Note.js @@ -190,7 +190,7 @@ Note.getDiffText = (userId, noteId, usersCurrentText, lastUpdated) => { let newText = usersCurrentText.replace(/(\r\n|\n|\r)/gm,"") if(noteObject.updated == lastUpdated){ - console.log('No note diff') + // console.log('No note diff') resolve(null) } @@ -222,7 +222,7 @@ Note.getDiffText = (userId, noteId, usersCurrentText, lastUpdated) => { } //Final change in notes - console.log(returnData) + // console.log(returnData) resolve(returnData) })