iTwin / iTwinUI-react

A react component library for iTwinUI.
https://github.com/iTwin/iTwinUI
Other
83 stars 23 forks source link

Pointer actions not working with slider #511

Closed taharaza16 closed 2 years ago

taharaza16 commented 2 years ago

Describe the bug (actual behavior)

We encountered a specific bug in the iTwin-React Slider component during development. This component overrides the default behavior of pointer move event which means that we are not able to perform default pointer actions such e.g. selecting text when the slider is in the DOM.I am unable to select text after adjusting slider value. As seen in the gif below: chrome-capture (1)

Expected behavior

Adjusting the slider should not effect pointer actions in other elements.

Reproduction

Link to a minimal repro:

Steps to reproduce
  1. Select Text (works fine)
  2. Adjust Slider (triggers bug)
  3. Select Text Again (doesn't work)
mayank99 commented 2 years ago

Since we are using similar event handling in ColorPicker too, this issue exists there as well. Might be able to fix the two together slide

FlyersPh9 commented 2 years ago

If you try to click & drag to highlight the text it does not work, however if you double click within the <input> it will select. Just something I discovered while playing around with the sandbox.