From cdc2529c4dbc076871f47c203a04e020f7f068b0 Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Sun, 17 Sep 2023 14:31:48 +0200 Subject: fix(files): CustomElementRender $el replacement bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) Signed-off-by: nextcloud-command --- apps/files/src/components/CustomElementRender.vue | 9 +++------ apps/files/src/components/FileEntry.vue | 2 +- apps/files/src/components/FilesListVirtual.vue | 5 ++++- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'apps/files/src') diff --git a/apps/files/src/components/CustomElementRender.vue b/apps/files/src/components/CustomElementRender.vue index 62e33b06acf..66774bb52a0 100644 --- a/apps/files/src/components/CustomElementRender.vue +++ b/apps/files/src/components/CustomElementRender.vue @@ -59,14 +59,11 @@ export default { }, methods: { async updateRootElement() { - const span = document.createElement('span') as HTMLSpanElement - this.$el.replaceWith(span) - this.$el = span - const element = await this.render(this.source, this.currentView) if (element) { - this.$el.replaceWith(element) - this.$el = element + this.$el.replaceChildren(element) + } else { + this.$el.replaceChildren() } }, }, diff --git a/apps/files/src/components/FileEntry.vue b/apps/files/src/components/FileEntry.vue index 9ba85709b15..30ab98c9dc6 100644 --- a/apps/files/src/components/FileEntry.vue +++ b/apps/files/src/components/FileEntry.vue @@ -25,7 +25,7 @@ data-cy-files-list-row :data-cy-files-list-row-fileid="fileid" :data-cy-files-list-row-name="source.basename" - class="list__row" + class="files-list__row" @contextmenu="onRightClick"> diff --git a/apps/files/src/components/FilesListVirtual.vue b/apps/files/src/components/FilesListVirtual.vue index 9ea7dfc569f..ace8d87fc8c 100644 --- a/apps/files/src/components/FilesListVirtual.vue +++ b/apps/files/src/components/FilesListVirtual.vue @@ -309,9 +309,12 @@ export default Vue.extend({ } } - .files-list__row{ + .files-list__row { &:hover, &:focus, &:active, &--active { background-color: var(--color-background-dark); + > * { + --color-border: var(--color-border-dark); + } // Hover state of the row should also change the favorite markers background .favorite-marker-icon svg path { stroke: var(--color-background-dark); -- cgit v1.2.3