react-drag-to-select icon indicating copy to clipboard operation
react-drag-to-select copied to clipboard

Support for multiple eventsElement?

Open caroline-hughes opened this issue 1 year ago • 1 comments

In my project, select can occur within the HTMLElement "doc-viewer":

eventsElement: document.getElementById("doc-viewer")

Once drag selection ends, we show a div for that box area on top of "doc-viewer". Ideally, drag selection can begin in this box, or end in it if started from within "doc-viewer". But since the box z-index is higher, it can't. See video.

Think of these box areas as comments on a document. Ideally, two comment areas can overlap.

What is the best solution here? Would it be possible to support multiple eventsElements?

https://github.com/AirLabsTeam/react-drag-to-select/assets/60591387/b399e296-512f-4b94-9fa7-5667bc148611

caroline-hughes avatar Jan 18 '24 02:01 caroline-hughes

Could you create a codesandbox with a simple example?

tomaszczura avatar Jan 18 '24 08:01 tomaszczura