ramp4-pcar4 / cesi_testing_party_240709

A private repo for temporarily hosting issues for a Testing Party
0 stars 0 forks source link

On mobile, the share map `copy`, `refresh`, and `close` buttons aren't working while text in input box is selected #15

Open RyanCoulsonCA opened 4 months ago

RyanCoulsonCA commented 4 months ago

Describe the bug On mobile, if you click Share map and then try to click the x button next to the input box, it will not work unless you first de-select the text in the input box.

To Reproduce Steps to reproduce the behavior (TIP: Provide a direct URL using the "Share" button above the map):

  1. Go to the test page on mobile.
  2. Click on Share map.
  3. While the text in the input box is still highlighted, try to press the X button.
  4. I'm not able to press it unless I first de-select the text.

Expected behavior The button should work without needing to de-select text.

Environment

RyanCoulsonCA commented 4 months ago

Video here https://i.imgur.com/EywjpWz.mp4

james-rae commented 4 months ago

I don't know what the CESI source code is, but if its using the oldschool document.execCommand("copy"), might be worth trying to update to modern ClipboardAPI

edit: read issue too fast, this probably isn't the cause if it's "selection" related