text icon indicating copy to clipboard operation
text copied to clipboard

Multiple elements with the same html id

Open vinicius73 opened this issue 3 years ago • 3 comments

Describe the bug

the same editor component runs almost 2 times:

  • Rich Workspaces
  • Modal/Full editor

https://github.com/nextcloud/text/blob/ab7dcc2b607c00b56a044e8a9a36a999eeb36e80/src/components/EditorWrapper.vue#L24

It's natural to have the same ID more than one time in this scenario. Although the #editor appears 3 times.

image

Expected behavior We must do not repeat the same ID on all pages, it can introduce unexpected behaviors. In my first investigation, looks like it is impacting the possibility to print the documents. (#112)

vinicius73 avatar May 05 '22 12:05 vinicius73

@vinicius73 As discussed, we should address that during early development of 25, but probably after #2278 is merged

juliusknorr avatar May 09 '22 12:05 juliusknorr

@vinicius73 As discussed, we should address that during early development of 25, but probably after #2278 is merged

The new approach to #2278 (using webpack to build a minimal package in dist) will avoid moving around many files. So i think we could work on the two in parallel.

max-nextcloud avatar May 09 '22 13:05 max-nextcloud

One of these IDs is from server. https://github.com/nextcloud/server/blob/master/apps/files/templates/list.php#L78

image

vinicius73 avatar May 13 '22 21:05 vinicius73