text icon indicating copy to clipboard operation
text copied to clipboard

Read only shared files seem editable in current main branch

Open max-nextcloud opened this issue 3 years ago • 1 comments

Describe the bug Files that are shared as read only seem to be editable. When clicking a line it get's a blue highlight and one can type and change its content.

To Reproduce Steps to reproduce the behavior:

  1. Create a .md file with some paragraphs
  2. Create a read only link to it
  3. open that link in an incognito browser window
  4. Click one of the paragraphs and start typing

Expected behavior The text remains as it was. No highlights are applied and no content is altered

Screenshots Bildschirmfoto vom 2022-08-01 10-32-49

Client details:

  • OS: ubuntu 22.04
  • Browser: Chromium
  • Version: current main branch
  • Device: desktop

Text app version: current main branch

This behavior disappears when removing the webkit-user-modify setting: Bildschirmfoto vom 2022-08-01 10-34-45

max-nextcloud avatar Aug 01 '22 08:08 max-nextcloud

Good catch, seems I applied the rule to widely while it should only be for contenteditable=true https://github.com/nextcloud/text/pull/2712/files#diff-e45ce3a454c97498daa53f43c438ba1be6ee1b3cfea83cee90053fbe14ad78b2R17-R18

juliusknorr avatar Aug 01 '22 08:08 juliusknorr

I have a problem that may be somehow connected: if I share a folder read-only, the .txt and .md files in that folder can't be viewed. The window is empty, with only the filename shown at the top, and in the console I have the following error: PUT https://xxxxxxxxx/index.php/apps/text/session/create 401 (Unauthorized)

alarmix avatar Oct 29 '22 11:10 alarmix

Please open a new issue and provide the additional details asked for in the issue template. :)

juliusknorr avatar Oct 29 '22 13:10 juliusknorr