Reputation: 43
I am using gridstack to render variable content onto a website. I need to render a table and some text inside the grid element, which works fine so far. BUT I want to allow the user to select portions of the rendered table text or other plain text with copy and paste but gridstack does not allow the selection it just drags the widget. Is there a way to make a handle bar visible and to allow only the dragging when the user selects the handlebar not the content ?
Upvotes: 1
Views: 973
Reputation: 1
Add
onMouseDown='event.stopPropagation();'
To any element you don't want to be able to drag with grid stack.
:)
Upvotes: 0
Reputation: 11
It should work to override the handle selector in the 'draggable' options, e.g:
GridStack.init({
draggable: {
handle: '.your-handle-class',
}
});
Upvotes: 1