File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ Change log
55<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
66** Table of Contents** * generated with [ DocToc] ( http://doctoc.herokuapp.com/ ) *
77
8+ - [ 4.2.1-dev] ( #421-dev )
89- [ 4.2.1 (2021-4-18)] ( #421-2021-4-18 )
910- [ 4.2.0 (2021-4-11)] ( #420-2021-4-11 )
1011- [ 4.1.0 (2021-4-7)] ( #410-2021-4-7 )
@@ -54,6 +55,10 @@ Change log
5455- [ v0.1.0 (2014-11-18)] ( #v010-2014-11-18 )
5556
5657<!-- END doctoc generated TOC please keep comment here to allow auto update -->
58+ ## 4.2.1-dev
59+
60+ - fix [ #1684 ] ( https://github.com/gridstack/gridstack.js/issues/1684 ) mac Safari H5 draggable broken in 4.0.1. Thanks [ @wurambo ] ( https://github.com/wurambo )
61+
5762## 4.2.1 (2021-4-18)
5863
5964- fix [ #1700 ] ( https://github.com/gridstack/gridstack.js/issues/1700 ) JQ nested grid drag fix broken in 4.0.3 (but much older underlying issue)
Original file line number Diff line number Diff line change @@ -105,12 +105,14 @@ export class DDDroppable extends DDBaseImplement implements HTMLElementExtendOpt
105105
106106 /** @internal called when the item is leaving our area, stop tracking if we had moving item */
107107 private _dragLeave ( event : DragEvent ) : void {
108+
109+ // ignore leave events on our children (get when starting to drag our items)
108110 // Note: Safari Mac has null relatedTarget which causes #1684 so check if DragEvent is inside the grid instead
109111 if ( ! event . relatedTarget ) {
110112 const { bottom, left, right, top } = this . el . getBoundingClientRect ( ) ;
111113 if ( event . x < right && event . x > left && event . y < bottom && event . y > top ) return ;
112- }
113- if ( this . el . contains ( event . relatedTarget as HTMLElement ) ) return ;
114+ } else if ( this . el . contains ( event . relatedTarget as HTMLElement ) ) return ;
115+
114116 this . _removeLeaveCallbacks ( ) ;
115117 if ( this . moving ) {
116118 event . preventDefault ( ) ;
You can’t perform that action at this time.
0 commit comments