vue-drag-resize icon indicating copy to clipboard operation
vue-drag-resize copied to clipboard

@deactivated is not triggered when clicked on another instance of vue-drag-size

Open Jones-S opened this issue 4 years ago • 1 comments

First of all, thank you for your work. It's pretty awesome. I have one problem though: I have multiple instances of draggable containers and I want to have the one that the user is manipulating in the front.

I thought I could just change the z-index depending on if the item is active or not. Now the problem is, that the @deactivated event is not triggered if I click on another vue-drag-resize instance. Only if I click outside of all instances the @deactivate is triggered twice.

Is there any quick solution to this problem? Or could you somehow include a check on if one is clicking on the current element, and if not trigger the event?

Thanks for your feedback. Cheers

Jones-S avatar Apr 10 '20 16:04 Jones-S

you need to write a function to set all other instance.active = false which will be called on activated

pinkcao avatar Apr 16 '21 07:04 pinkcao