diff options
-rw-r--r-- | css/style.scss | 4 | ||||
-rw-r--r-- | cypress/e2e/attachments.spec.js | 2 | ||||
-rw-r--r-- | cypress/e2e/conflict.spec.js | 6 | ||||
-rw-r--r-- | src/components/Editor.vue | 2 | ||||
-rw-r--r-- | src/components/Editor/MainContainer.vue | 3 | ||||
-rw-r--r-- | src/components/Editor/Wrapper.vue | 3 | ||||
-rw-r--r-- | src/views/RichWorkspace.vue | 2 |
7 files changed, 10 insertions, 12 deletions
diff --git a/css/style.scss b/css/style.scss index 7aab36350..d872d5eb0 100644 --- a/css/style.scss +++ b/css/style.scss @@ -4,7 +4,7 @@ --text-editor-max-width: 670px } -.modal-container #editor-container { +.modal-container .text-editor { position: absolute; } @@ -31,7 +31,7 @@ li.ProseMirror-selectednode:after { } .has-conflicts, -#editor-wrapper.icon-loading { +.text-editor__wrapper.icon-loading { .ProseMirror-menubar { display: none; } diff --git a/cypress/e2e/attachments.spec.js b/cypress/e2e/attachments.spec.js index 82bde44e5..fd3401d63 100644 --- a/cypress/e2e/attachments.spec.js +++ b/cypress/e2e/attachments.spec.js @@ -83,7 +83,7 @@ const checkAttachment = (documentId, fileName, fileId, index, isImage = true) => cy.log('Check the attachment is visible and well formed', documentId, fileName, fileId, index, encodedName) return new Cypress.Promise((resolve, reject) => { - cy.get(`#editor [data-component="image-view"][data-src="${src}"]`) + cy.get(`.text-editor__main [data-component="image-view"][data-src="${src}"]`) .find('.image__view') // wait for load finish .within(($el) => { // keep track that we have created this attachment in the attachment dir diff --git a/cypress/e2e/conflict.spec.js b/cypress/e2e/conflict.spec.js index 7af005234..c439f30a7 100644 --- a/cypress/e2e/conflict.spec.js +++ b/cypress/e2e/conflict.spec.js @@ -26,7 +26,7 @@ const randUser = randHash() const fileName = 'test.md' describe('Open test.md in viewer', function() { - const getWrapper = () => cy.get('#editor-wrapper.has-conflicts.is-rich-editor') + const getWrapper = () => cy.get('.text-editor__wrapper.has-conflicts.is-rich-editor') before(() => { initUserAndFiles(randUser, fileName) @@ -47,12 +47,12 @@ describe('Open test.md in viewer', function() { cy.get('#viewer .modal-header button.header-close').click() cy.get('#viewer').should('not.exist') cy.openFile('test.md') - cy.get('#editor-container .document-status .icon-error') + cy.get('.text-editor .document-status .icon-error') getWrapper() .get('#read-only-editor h2') .should('contain', 'Hello world') getWrapper() - .get('#editor h2') + .get('.text-editor__main h2') .should('contain', 'Hello world') cy.screenshot() }) diff --git a/src/components/Editor.vue b/src/components/Editor.vue index 5a881c26e..df86bc73c 100644 --- a/src/components/Editor.vue +++ b/src/components/Editor.vue @@ -21,7 +21,7 @@ --> <template> - <div id="editor-container" data-text-el="editor-container" class="text-editor"> + <div data-text-el="editor-container" class="text-editor"> <DocumentStatus v-if="displayed" :idle="idle" :lock="lock" diff --git a/src/components/Editor/MainContainer.vue b/src/components/Editor/MainContainer.vue index 3447f3fb3..2300d3d82 100644 --- a/src/components/Editor/MainContainer.vue +++ b/src/components/Editor/MainContainer.vue @@ -21,8 +21,7 @@ --> <template> - <MediaHandler id="editor" - class="text-editor__main"> + <MediaHandler class="text-editor__main"> <slot /> </MediaHandler> </template> diff --git a/src/components/Editor/Wrapper.vue b/src/components/Editor/Wrapper.vue index 0725f93cb..f83bffe59 100644 --- a/src/components/Editor/Wrapper.vue +++ b/src/components/Editor/Wrapper.vue @@ -21,8 +21,7 @@ --> <template> - <div id="editor-wrapper" - class="text-editor__wrapper" + <div class="text-editor__wrapper" :class="{ 'has-conflicts': hasSyncCollission, 'icon-loading': !contentLoaded && !hasConnectionIssue, diff --git a/src/views/RichWorkspace.vue b/src/views/RichWorkspace.vue index 80c126c69..7be934b1c 100644 --- a/src/views/RichWorkspace.vue +++ b/src/views/RichWorkspace.vue @@ -100,7 +100,7 @@ export default { }, focus(newValue) { if (!newValue) { - document.querySelector('#editor').scrollTo(0, 0) + document.querySelector('#rich-workspace .text-editor__main').scrollTo(0, 0) } }, }, |