desandro / draggabilly

:point_down: Make that shiz draggable
https://draggabilly.desandro.com
MIT License
3.86k stars 387 forks source link

Lack of animation while dragging inline elements #152

Closed franciscolourenco closed 7 years ago

franciscolourenco commented 7 years ago

https://codepen.io/aristidesfl/pen/WpNEoX

franciscolourenco commented 7 years ago

Looks like transform doesn't support inline elements. https://drafts.csswg.org/css-transforms-1/#transformable-element

Any ideas besides setting display: inline-block?

franciscolourenco commented 7 years ago

Could we perhaps animate with left/top instead of transform when the element has display:inline?

desandro commented 7 years ago

Thanks for reporting this issue. Draggabilly does not support dragging inline elements. You'll have to use inline-block instead. See https://github.com/desandro/draggabilly/issues/69#issuecomment-65297156

franciscolourenco commented 7 years ago

The issue is inline block doesn't doesn't replace inline in every situation, like for example with multiline text. In the scenario I'm using draggabilly for (browser extension), converting elements to inline-block breaks the design.