I am trying to use ion-reorder in my Ionic 4/Angular application. I have copy/pasted from the online document, but I just cannot drag the items.
For example, as from here, I have the following:
<ion-content style="width: 100%; height: 100%" (ionScrollStart)='ionScrollStart()' (ionScrollEnd)='ionScrollEnd()'>
<ion-list style="width: 100%; height: 100%;">
<ion-reorder-group (ionItemReorder)="doReorder($event)" disabled="false">
<ion-item>
<ion-label>
Item 1
</ion-label>
<ion-reorder slot="start"></ion-reorder>
</ion-item>
<ion-item>
<ion-label>
Item 2
</ion-label>
<ion-reorder slot="start"></ion-reorder>
</ion-item>
<ion-item>
<ion-label>
Item 3
</ion-label>
<ion-reorder slot="start"></ion-reorder>
</ion-item>
</ion-reorder-group>
</ion-list>
</ion-content>
I see the reorder lines, and the had appears when I click on it, but the items just will not drag. Also, when I click the mouse, the hand cursor does not close like in the example.
I have nothing fancy here, so just not sure why it won't work.
My ionic info is
$ ionic info
Ionic:
Ionic CLI : 5.4.16 (C:\Users\pchapman\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.11.13
@angular-devkit/build-angular : 0.803.29
@angular-devkit/schematics : 8.3.29
@angular/cli : 8.2.2
@ionic/angular-toolkit : 2.3.3
Cordova:
Cordova CLI : 10.0.0 (cordova-lib@10.1.0)
Cordova Platforms : android 10.1.1, ios 6.2.0, windows 7.0.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 15 other plugins)
Utility:
cordova-res : 0.15.3
native-run : 0.2.9
System:
Android SDK Tools : 26.1.1 (C:\Users\pchapman\AppData\Local\Android\sdk)
NodeJS : v14.17.0 (C:\Program Files\nodejs\node.exe)
npm : 7.21.1
OS : Windows 10
I have tried this in a page (they are all lazy loaded - hope nothing to do with that), and in a popup component, it it just won't work at all (and yet it does in the doco, and another examples)
Why might this be?
Update 1
Trying to debug into this, this is the line where it is failing....
target appears to the hamburger image...
So it appears the target.closest('ion-reorder') is ont finding the ion-reorder.
And this in turn makes the mousedown do nothing...
I see that there is a shadow root boundary between these two elements. Can closest() transverse this boundary?
And if not, how could this component be working for anyone, which is obviously is, so why not for me?
All just guessing here...




