metasfresh / metasfresh-webui-frontend-legacy

metasfresh Webui Frontend
GNU General Public License v2.0
57 stars 34 forks source link

Cannot copy text unless it is doubleclicked #2254

Closed TheBestPessimist closed 5 years ago

TheBestPessimist commented 5 years ago

Is this a bug or feature request?

bug

window: http://localhost:3000/window/108/2188223

  1. Goto AD_User window, authentication token tab, click add new token image
  1. when i select the whole text by clicking at the beginning of the token, select the text until the end -- when i right click the selected text i cannot copy it (there's no option) and ctrl+C, ctrl+v doesn't work either.

GEdAJOPKW9

ionut-movila commented 5 years ago

Maybe this is just a matter of how we select the text and where we right-click to show the menu with copy option.

What I tested:

  1. Double click to select whole token and then you can use ctrl+c to copy or right click menu, but please be very careful when you open right click menu so the text will remain selected, you need to click on the token text and not outside because that will cause it to deselect (this is standard browser behaviour)
  2. Select the text manually, works either way with right click menu or ctrl+c but same rules apply: make sure text is still selected when pressing ctrl+c or make sure you right click on the text itself this way text will not get unselected.

@TheBestPessimist Please re-test and if all good close this issue.

ionut-movila commented 5 years ago

Maybe a more elegant solution can be to add a copy button, that will spare us from all the confusion regarding text selection and where to right-click.

TheBestPessimist commented 5 years ago

you need to click on the token text and not outside because that will cause it to deselect (this is standard browser behaviour)

but same rules apply: make sure text is still selected when pressing ctrl+c or make sure you right click on the text itself this way text will not get unselected.

That's exactly what i did in my example gif. In both times it can be seen that the text is selected when i try to copy/paste it.

Plus, this selection issue could also be related to https://github.com/metasfresh/metasfresh-webui-frontend/issues/2254

  1. Select the text manually, works either way with right click menu or ctrl+c

In my testing (albeit only when i opened the issue), when i right click the text (after selecting it with mouse movement, and not double click) you can see that even though i right click on the text, the selection is stopped/broken/removed (can't find a better word), nothing is selected anymore. In this selection case, even if i do ctrl+c (which it's true -- it doesn't break selection) nothing is actually pasted: that can be seen when i try to paste the code the second time: the code is not pasted, but the address, just like before. This shows that nothing is copied, even though I have text selected.

I'm not sure if this happens now (as i have been extremely careful so far to only double click for selection), but when i opened the issue i could not select a label for copy-pasta by left clicking and moving the mouse over the text (as to increase the selection) -- this is why i made a gif and not just describe in words. the gif should show the problem much better.

ionut-movila commented 5 years ago

@TheBestPessimist Attaching here the results on our end: http://recordit.co/kVTPRQ5htm

Can't reproduce the issue so far. Tested on Chrome version 74.0.3729.157 on macOS 10.13.6. App running from branch master.

TheBestPessimist commented 5 years ago

Yep, it seems to be working now for me as well Chrome 74.0.3729.157 (Official Build) (64-bit) windows.

We can just close this issue since it's working.

ionut-movila commented 5 years ago

All great, closing it.