- Fixed a bug where a missing parent check would cause exceptions
- Bumped
[email protected]
- Added a
canMove
method that returns whetherdrake
can move a DOM element
- Fixed a bug where
drake.cancel
would misbehave whencopy
wastrue
- Fixed a long-standing bug where candidate positioning would be off by one position
- Fixed a bug with clicks on IE7, IE8, IE9
- Fixed a bug where
shadow
even would trigger multiple times when moving over the last position
- Fixed an instrumentation issue that prevented the tests from running
- Fixed an issue that prevented
dragula
from execution early in the document load life-cycle
- Fixed a touch events regression introduced in
3.6.1
- Fixed issues in touch-enabled browsers such as Windows Phone 10
- Introduced support for
contentEditable
DOM attribute
- Switched from
.parentElement
to.parentNode
avoiding bugs when hovering over<svg>
elements
- Fixed a bug where mobile devices wouldn't be able to drag elements
- Fixed a bug where
<select>
inputs couldn't be focused
- Fixed a bug when determining the mouse button being pressed
- Fixed a bug when determining the element behind the mouse cursor when
ignoreInputTextSelection
was enabled
- Added a feature where users are able to select text ranges with their mouse in inputs within a dragula container
- Fixed a bug where text in inputs inside containers assigned to
dragula
couldn't be selected
- Events for
cancel
,remove
, andshadow
now all provide asource
parameter in the third position
- Fixed a bug where
out
would be emitted with anundefined
container
- Fixed a fringe bug (#207) where the click handler wouldn't work
- Fixed a bug where
drop
events would sometimes not receive the current sibling
- The
options.moves
callback now receives a fourth parameter, thesibling
found afterel
- The
drop
event now receives a fourth parameter, thesibling
found afterel
- You can now use
options.copySortSource
to enable sorting incopy
-source containers
- You can now set
options.copy
to a method. It'll be invoked once per drag to ask whether the element being dragged should be treated as a copy or not - Fixed a bug where starting a drag programatically while an element was being dragged resulted in an exception
- Fixed a bug in Webpack builds by updating
crossvent
to1.5.3
- Fixed a bug where
mousedown
would be prevented and focusing draggable inputs wouldn't be possible
- Fixed a bug in IE8 by updating
crossvent
to1.5.2
- Fixed a bug in Firefox where dragging links and images would result in issues
- Fixed a historical bug, where click on anchors would be ignored within
dragula
containers in mobile - Fixed a bug where events wouldn't be gracefully removed if
drake
were destroyed during a drag event - Now emits
dragend
afterout
to preserve consistency (becausedrag
is emitted beforeover
) - Fixed another old bug where attempting to remove elements using
removeOnSpill
on mobile would fail
- Fixed a bug in mobile, caused by
3.0.0
, where scrolling would be impossible - Fixed a bug where dragging would cause text selection in IE8
- Removed
addContainer
method, which was previously deprecated - Removed
removeContainer
method, which was previously deprecated - Removed
delay
option in favor of usingmousemove
- Drag events now start on the first occurrence of a
mousemove
event - If
mousemove
never fires, then thedrag
machinery won't start, either - Changed default value for
invalid
, now always returnsfalse
by default - Added
mirrorContainer
option to determine where the mirror gets appended to (defaults todocument.body
)
- Fixed a bug where
shadow
would trigger multiple times while dragging an element over the same spot
- Fixed a bug where adding and removing classes might've caused issues on elements that had foreign CSS classes
- Added an argument to
cloned
event that specifies the kind of clone. Possible values includemirror
andcopy
at the moment
- Added
over
event that fires whenever an element is dragged over a container (or whenever a drag event starts) - Added
out
event that fires whenever an element is dragged out of a container (or whenever a drag event ends)
- Fixed a bug caused in
2.0.6
where anything would be regarded as adrake
container
- Fixed a bug where
isContainer
would be called with ael=null
in some situations
- Bumped
[email protected]
- Set
gu-transit
after a drag event has fully started
- Fixed a bug where using
.cancel
would throw an exception
- Replaced
contra.emitter
with[email protected]/emitter
- Fixed a bug where dragging a copy back to origin after hovering over another container would still result in a copy being made if you never spilled the item
- Deprecated
addContainer
method - Deprecated
removeContainer
method - Exposed
dragula.containers
collection - Introduced dynamic
isContainer
method - Can now omit
containers
argument todragula(containers, options)
- Can now pass
containers
as an option
- Differentiate between drag and click using
delay
option - Ability to specify which event targets are
invalid
drag triggers
- Improved shadow positioning when
revertOnSpill
istrue
- Added
'cloned'
event when a DOM element is cloned
- Fixed an issue where dragula didn't understand where an element was being dropped
- Introduced drag handles so that elements could only be dragged from a handle element
- Fixed a bug where
addContainer
andremoveContainer
wouldn't update the list of available containers - Fixed a bug where
document.body
would be accessed before it was available if the scripts were loaded in the<head>
- Fixed an issue where manually started drag events wouldn't know if position changed when an item was dropped in the source container
- Added minor styling to
gu-mirror
, to visually identify that a drag is in progress
- Added a
dragend
event that's always fired - Added a
dragging
property to API - Introduced manual
start
API method - Introduced
addContainer
andremoveContainer
dynamic API
Introduced an .end
instance API method that gracefully ends the drag event using the last known valid drop target.
- The
accepts
option now takes a fourth argument,sibling
, giving us a hint of the precise position the item would be dropped in
- Fixed a bug in cross browser behavior that caused the hover effect to ignore scrolling
- Fixed a bug where touch events weren't working in obscure versions of IE
- Improved
accepts
mechanism so that it always accepts the original starting point
- Fixed a bug introduced in
1.2.0
- Fixed a bug where cancelling with
revert
enabled wouldn't respect sort order
- Introduced
moves
option, used to determine if an item is draggable - Added a
source
parameter for thedrop
event - Cancelling a drag event when
revertOnSpill
istrue
will now move the element to its original position in the source element instead of appending it - Fixed a bug where "cancellations" that ended up leaving the dragged element in the source container but changed sort order would trigger a
cancel
event instead ofdrop
- Fixed a bug where "drops" that ended up leaving the element in the exact same place it was dragged from would end up triggering a
drop
event instead ofcancel
- Added touch event support
- Added
'shadow'
event to enable easy updates to shadow element as it's moved
- Fixed a bug where
dragula
wouldn't make a copy if the element was dropped outside of a target container - If a dragged element gets removed for an instance that has
copy
set totrue
, acancel
event is raised instead
- Fixed a bug where "cancellations" that ended up leaving the dragged element somewhere other than the source container wouldn't trigger a
drop
event
- Fixed a bug where the movable shadow wouldn't update properly if the element was hovered over the last position of a container
- Added a movable shadow that gives visual feedback as to where a dragged item would be dropped
- Added an option to remove dragged elements when they are dropped outside of sanctioned containers
- Added an option to revert dragged elements back to their source container when they are dropped outside of sanctioned containers
- Removed
console.log
statement
- Initial Public Release