@syncfusion/ej2-filemanager 27.1.50 → 27.1.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 27.1.50
3
+ * version : 27.1.52
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-filemanager@*",
3
- "_id": "@syncfusion/ej2-filemanager@27.1.48",
3
+ "_id": "@syncfusion/ej2-filemanager@27.1.51",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-m1z1F9NxEiSPf2J6xF/CJvIjtSkQxRkLloOcvdVySsFyXPnt7itaXlV2pSKcU4MKtyZjfdZTgSXUFsH09eP9QA==",
5
+ "_integrity": "sha512-zvq338TUENAwjdxhgETsgV5wXO7ghEx5eaAl8gcoOG7utuYrJqsunX0XoIp976gv89rwB3TrWV7cuwc9Q9uSKA==",
6
6
  "_location": "/@syncfusion/ej2-filemanager",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -24,8 +24,8 @@
24
24
  "/@syncfusion/ej2-richtexteditor",
25
25
  "/@syncfusion/ej2-vue-filemanager"
26
26
  ],
27
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-filemanager/-/ej2-filemanager-27.1.48.tgz",
28
- "_shasum": "0f7641c429ee833c9a5089591f5388d7f5e7b42d",
27
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-filemanager/-/ej2-filemanager-27.1.51.tgz",
28
+ "_shasum": "f6e4914ca5297cf0bf20445da3ab2fb52a85433d",
29
29
  "_spec": "@syncfusion/ej2-filemanager@*",
30
30
  "_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
31
31
  "author": {
@@ -36,14 +36,14 @@
36
36
  },
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
- "@syncfusion/ej2-base": "~27.1.50",
40
- "@syncfusion/ej2-buttons": "~27.1.50",
41
- "@syncfusion/ej2-data": "~27.1.50",
42
- "@syncfusion/ej2-grids": "~27.1.50",
39
+ "@syncfusion/ej2-base": "~27.1.52",
40
+ "@syncfusion/ej2-buttons": "~27.1.51",
41
+ "@syncfusion/ej2-data": "~27.1.52",
42
+ "@syncfusion/ej2-grids": "~27.1.52",
43
43
  "@syncfusion/ej2-inputs": "~27.1.50",
44
- "@syncfusion/ej2-layouts": "~27.1.50",
44
+ "@syncfusion/ej2-layouts": "~27.1.51",
45
45
  "@syncfusion/ej2-lists": "~27.1.50",
46
- "@syncfusion/ej2-navigations": "~27.1.50",
46
+ "@syncfusion/ej2-navigations": "~27.1.52",
47
47
  "@syncfusion/ej2-popups": "~27.1.50",
48
48
  "@syncfusion/ej2-splitbuttons": "~27.1.50"
49
49
  },
@@ -75,6 +75,6 @@
75
75
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
76
76
  },
77
77
  "typings": "index.d.ts",
78
- "version": "27.1.50",
78
+ "version": "27.1.52",
79
79
  "sideEffects": false
80
80
  }
@@ -823,14 +823,7 @@ function readSuccess(parent, result, event) {
823
823
  }
824
824
  }
825
825
  catch (error) {
826
- var errorResult = {
827
- files: null,
828
- error: {
829
- message: error.message,
830
- fileExists: null
831
- }
832
- };
833
- onFailure(parent, errorResult, 'read');
826
+ handleCatchError(parent, error, 'read');
834
827
  parent.setProperties({ path: parent.oldPath }, true);
835
828
  parent.pathNames.pop();
836
829
  }
@@ -929,60 +922,68 @@ function createSuccess(parent, result, itemName) {
929
922
  * @private
930
923
  */
931
924
  function renameSuccess(parent, result) {
932
- if (!isNOU(result.files)) {
933
- if (!isNOU(parent.dialogObj)) {
934
- parent.dialogObj.hide();
935
- }
936
- var args = { action: 'rename', result: result };
937
- parent.trigger('success', args);
938
- parent.renamedItem = Array.isArray(result.files) ? result.files[0] : result.files;
939
- var renameEventArgs = {
940
- newName: parent.renamedItem.name,
941
- itemData: parent.renamedItem,
942
- path: parent.path
943
- };
944
- parent.trigger('rename', renameEventArgs);
945
- if (parent.activeModule === 'navigationpane') {
946
- parent.pathId.pop();
947
- parent.itemData = [getValue(parent.pathId[parent.pathId.length - 1], parent.feParent)];
948
- read(parent, events.renameEndParent, getValue('filterPath', parent.renamedItem).replace(/\\/g, '/'));
949
- parent.itemData[0] = parent.renamedItem;
950
- if (getValue('filterPath', parent.renamedItem) === getValue('filterPath', parent.itemData[0]) && parent.pathNames.length > 1) {
951
- parent.pathNames[parent.pathNames.length - 1] = parent.renameText;
925
+ try {
926
+ if (!isNOU(result.files)) {
927
+ if (!isNOU(parent.dialogObj)) {
928
+ parent.dialogObj.hide();
952
929
  }
953
- read(parent, events.pathChanged, parent.path === '/' ? parent.path : getValue('filterPath', parent.renamedItem).replace(/\\/g, '/') + parent.renamedItem.name + '/');
954
- parent.renamedItem = null;
955
- }
956
- else {
957
- parent.itemData = [getPathObject(parent)];
958
- if (parent.breadcrumbbarModule.searchObj.value !== '') {
959
- Search(parent, events.renameEnd, parent.path, parent.searchWord, parent.showHiddenItems, !parent.searchSettings.ignoreCase);
930
+ var args = { action: 'rename', result: result };
931
+ parent.trigger('success', args);
932
+ parent.renamedItem = Array.isArray(result.files) ? result.files[0] : result.files;
933
+ var renameEventArgs = {
934
+ newName: parent.renamedItem.name,
935
+ itemData: parent.renamedItem,
936
+ path: parent.path
937
+ };
938
+ parent.trigger('rename', renameEventArgs);
939
+ if (parent.activeModule === 'navigationpane') {
940
+ parent.pathId.pop();
941
+ parent.itemData = [getValue(parent.pathId[parent.pathId.length - 1], parent.feParent)];
942
+ read(parent, events.renameEndParent, getValue('filterPath', parent.renamedItem).replace(/\\/g, '/'));
943
+ parent.itemData[0] = parent.renamedItem;
944
+ if (getValue('filterPath', parent.renamedItem) === getValue('filterPath', parent.itemData[0]) && parent.pathNames.length > 1) {
945
+ parent.pathNames[parent.pathNames.length - 1] = parent.renameText;
946
+ }
947
+ read(parent, events.pathChanged, parent.path === '/' ? parent.path : getValue('filterPath', parent.renamedItem).replace(/\\/g, '/') + parent.renamedItem.name + '/');
948
+ parent.renamedItem = null;
960
949
  }
961
950
  else {
962
- if (parent.isFiltered) {
963
- filter(parent, events.renameEnd);
951
+ parent.itemData = [getPathObject(parent)];
952
+ if (parent.breadcrumbbarModule.searchObj.value !== '') {
953
+ Search(parent, events.renameEnd, parent.path, parent.searchWord, parent.showHiddenItems, !parent.searchSettings.ignoreCase);
964
954
  }
965
955
  else {
966
- read(parent, events.renameEnd, parent.path);
956
+ if (parent.isFiltered) {
957
+ filter(parent, events.renameEnd);
958
+ }
959
+ else {
960
+ read(parent, events.renameEnd, parent.path);
961
+ }
967
962
  }
968
963
  }
969
964
  }
970
- }
971
- else {
972
- if (result.error.code === '400' && parent.dialogObj && parent.dialogObj.visible) {
973
- var ele = select('#rename', parent.dialogObj.element);
974
- var error = getLocaleText(parent, 'Validation-Rename-Exists').replace('{0}', '"' + parent.currentItemText + '"');
975
- error = error.replace('{1}', '"' + ele.value + '"');
976
- ele.parentElement.nextElementSibling.innerHTML = error;
977
- var args = { action: 'rename', error: result.error };
978
- parent.trigger('failure', args);
979
- }
980
965
  else {
981
- if (!isNOU(parent.dialogObj)) {
982
- parent.dialogObj.hide();
966
+ if (result.error.code === '400' && parent.dialogObj && parent.dialogObj.visible) {
967
+ var ele = select('#rename', parent.dialogObj.element);
968
+ var error = getLocaleText(parent, 'Validation-Rename-Exists').replace('{0}', '"' + parent.currentItemText + '"');
969
+ error = error.replace('{1}', '"' + ele.value + '"');
970
+ ele.parentElement.nextElementSibling.innerHTML = error;
971
+ var args = { action: 'rename', error: result.error };
972
+ parent.trigger('failure', args);
983
973
  }
984
- onFailure(parent, result, 'rename');
974
+ else {
975
+ if (!isNOU(parent.dialogObj)) {
976
+ parent.dialogObj.hide();
977
+ }
978
+ onFailure(parent, result, 'rename');
979
+ }
980
+ }
981
+ }
982
+ catch (error) {
983
+ if (!isNOU(parent.dialogObj)) {
984
+ parent.dialogObj.hide();
985
985
  }
986
+ handleCatchError(parent, error, 'rename');
986
987
  }
987
988
  }
988
989
  /* istanbul ignore next */
@@ -997,36 +998,41 @@ function renameSuccess(parent, result) {
997
998
  * @private
998
999
  */
999
1000
  function pasteSuccess(parent, result, path, operation) {
1000
- var moveorcopyEventArgs = {
1001
- itemData: result.files,
1002
- isCopy: operation === 'copy' ? true : false,
1003
- path: path,
1004
- targetData: parent.itemData[0],
1005
- targetPath: parent.path
1006
- };
1007
- parent.trigger('move', moveorcopyEventArgs);
1008
- if (result.error && result.error.fileExists) {
1009
- parent.fileLength = 0;
1010
- if (!isNOU(result.files)) {
1011
- parent.isPasteError = true;
1001
+ try {
1002
+ var moveorcopyEventArgs = {
1003
+ itemData: result.files,
1004
+ isCopy: operation === 'copy' ? true : false,
1005
+ path: path,
1006
+ targetData: parent.itemData[0],
1007
+ targetPath: parent.path
1008
+ };
1009
+ parent.trigger('move', moveorcopyEventArgs);
1010
+ if (result.error && result.error.fileExists) {
1011
+ parent.fileLength = 0;
1012
+ if (!isNOU(result.files)) {
1013
+ parent.isPasteError = true;
1014
+ doPasteUpdate(parent, operation, result);
1015
+ }
1016
+ createExtDialog(parent, 'DuplicateItems', result.error.fileExists);
1017
+ if (result.error.code === '404') {
1018
+ createDialog(parent, 'Error', result);
1019
+ }
1020
+ }
1021
+ else if (!result.error && !isNOU(result.files)) {
1022
+ parent.isPasteError = false;
1012
1023
  doPasteUpdate(parent, operation, result);
1013
1024
  }
1014
- createExtDialog(parent, 'DuplicateItems', result.error.fileExists);
1015
- if (result.error.code === '404') {
1025
+ else if (result.error && !isNOU(result.files)) {
1026
+ parent.isPasteError = true;
1027
+ doPasteUpdate(parent, operation, result);
1016
1028
  createDialog(parent, 'Error', result);
1017
1029
  }
1030
+ else {
1031
+ onFailure(parent, result, operation);
1032
+ }
1018
1033
  }
1019
- else if (!result.error && !isNOU(result.files)) {
1020
- parent.isPasteError = false;
1021
- doPasteUpdate(parent, operation, result);
1022
- }
1023
- else if (result.error && !isNOU(result.files)) {
1024
- parent.isPasteError = true;
1025
- doPasteUpdate(parent, operation, result);
1026
- createDialog(parent, 'Error', result);
1027
- }
1028
- else {
1029
- onFailure(parent, result, operation);
1034
+ catch (error) {
1035
+ handleCatchError(parent, error, operation);
1030
1036
  }
1031
1037
  }
1032
1038
  /**
@@ -1039,25 +1045,30 @@ function pasteSuccess(parent, result, path, operation) {
1039
1045
  * @private
1040
1046
  */
1041
1047
  function deleteSuccess(parent, result, path) {
1042
- var deleteEventArgs = {
1043
- itemData: result.files,
1044
- path: path
1045
- };
1046
- parent.trigger('delete', deleteEventArgs);
1047
- if (!isNOU(result.files)) {
1048
- parent.setProperties({ path: path }, true);
1049
- parent.itemData = [getPathObject(parent)];
1050
- read(parent, events.deleteEnd, parent.path);
1051
- if (result.error) {
1052
- onFailure(parent, result, 'delete');
1048
+ try {
1049
+ var deleteEventArgs = {
1050
+ itemData: result.files,
1051
+ path: path
1052
+ };
1053
+ parent.trigger('delete', deleteEventArgs);
1054
+ if (!isNOU(result.files)) {
1055
+ parent.setProperties({ path: path }, true);
1056
+ parent.itemData = [getPathObject(parent)];
1057
+ read(parent, events.deleteEnd, parent.path);
1058
+ if (result.error) {
1059
+ onFailure(parent, result, 'delete');
1060
+ }
1061
+ else {
1062
+ var args = { action: 'delete', result: result };
1063
+ parent.trigger('success', args);
1064
+ }
1053
1065
  }
1054
1066
  else {
1055
- var args = { action: 'delete', result: result };
1056
- parent.trigger('success', args);
1067
+ onFailure(parent, result, 'delete');
1057
1068
  }
1058
1069
  }
1059
- else {
1060
- onFailure(parent, result, 'delete');
1070
+ catch (error) {
1071
+ handleCatchError(parent, error, 'delete');
1061
1072
  }
1062
1073
  }
1063
1074
  /**
@@ -1073,13 +1084,18 @@ function deleteSuccess(parent, result, path) {
1073
1084
  function detailsSuccess(
1074
1085
  // eslint:disable-next-line
1075
1086
  parent, result, path, operation) {
1076
- if (!isNOU(result.details)) {
1077
- createDialog(parent, operation, null, result.details);
1078
- var args = { action: 'details', result: result };
1079
- parent.trigger('success', args);
1087
+ try {
1088
+ if (!isNOU(result.details)) {
1089
+ createDialog(parent, operation, null, result.details);
1090
+ var args = { action: 'details', result: result };
1091
+ parent.trigger('success', args);
1092
+ }
1093
+ else {
1094
+ onFailure(parent, result, 'details');
1095
+ }
1080
1096
  }
1081
- else {
1082
- onFailure(parent, result, 'details');
1097
+ catch (error) {
1098
+ handleCatchError(parent, error, 'details');
1083
1099
  }
1084
1100
  }
1085
1101
  /**
@@ -1126,13 +1142,18 @@ export function Search(parent, event, path, searchString, showHiddenItems, caseS
1126
1142
  * @private
1127
1143
  */
1128
1144
  function searchSuccess(parent, result, event) {
1129
- if (!isNOU(result.files)) {
1130
- parent.notify(event, result);
1131
- var args = { action: 'search', result: result };
1132
- parent.trigger('success', args);
1145
+ try {
1146
+ if (!isNOU(result.files)) {
1147
+ parent.notify(event, result);
1148
+ var args = { action: 'search', result: result };
1149
+ parent.trigger('success', args);
1150
+ }
1151
+ else {
1152
+ onFailure(parent, result, 'search');
1153
+ }
1133
1154
  }
1134
- else {
1135
- onFailure(parent, result, 'search');
1155
+ catch (error) {
1156
+ handleCatchError(parent, error, 'search');
1136
1157
  }
1137
1158
  }
1138
1159
  /* istanbul ignore next */
@@ -1176,49 +1197,73 @@ export function Download(parent, path, items) {
1176
1197
  parent.element.removeChild(form);
1177
1198
  }
1178
1199
  else {
1179
- var contentDisposition_1;
1180
- var fileName_1;
1181
- var fetch_1 = new Fetch({
1182
- url: getValue('url', downloadArgs.ajaxSettings),
1183
- type: getValue('type', downloadArgs.ajaxSettings),
1184
- contentType: getValue('contentType', downloadArgs.ajaxSettings),
1185
- responseType: getValue('responseType', downloadArgs.ajaxSettings),
1186
- beforeSend: getValue('beforeSend', downloadArgs.ajaxSettings),
1187
- onLoad: function (e) {
1188
- contentDisposition_1 = e.headers.get('Content-Disposition');
1189
- if (contentDisposition_1) {
1190
- var filenameMatch = contentDisposition_1.match(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/);
1191
- var extractedFilename = filenameMatch && filenameMatch[1];
1192
- fileName_1 = extractedFilename ? extractedFilename.replace(/['"]/g, '') : fileName_1;
1193
- }
1194
- else {
1195
- fileName_1 = parent.itemData.length > 1 ? 'files.zip' : getValue('isFile', parent.itemData[0]) ? getValue('name', parent.itemData[0]) : getValue('name', parent.itemData[0]) + '.zip';
1196
- }
1197
- },
1198
- onSuccess: function (e) {
1199
- parent.trigger('success', downloadArgs);
1200
- var blob = e;
1201
- var blobUrl = URL.createObjectURL(blob);
1202
- var link = document.createElement('a');
1203
- link.href = blobUrl;
1204
- link.download = fileName_1;
1205
- document.body.appendChild(link);
1206
- link.click();
1207
- document.body.removeChild(link);
1208
- },
1209
- onFailure: function (e) {
1210
- var result = {
1211
- error: {
1212
- code: e.status.toString(),
1213
- message: getLocaleText(parent, 'Network-Error') + ' ' + parent.ajaxSettings.downloadUrl
1200
+ try {
1201
+ var contentDisposition_1;
1202
+ var fileName_1;
1203
+ var fetch_1 = new Fetch({
1204
+ url: getValue('url', downloadArgs.ajaxSettings),
1205
+ type: getValue('type', downloadArgs.ajaxSettings),
1206
+ contentType: getValue('contentType', downloadArgs.ajaxSettings),
1207
+ responseType: getValue('responseType', downloadArgs.ajaxSettings),
1208
+ beforeSend: getValue('beforeSend', downloadArgs.ajaxSettings),
1209
+ onLoad: function (e) {
1210
+ contentDisposition_1 = e.headers.get('Content-Disposition');
1211
+ if (contentDisposition_1) {
1212
+ var filenameMatch = contentDisposition_1.match(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/);
1213
+ var extractedFilename = filenameMatch && filenameMatch[1];
1214
+ fileName_1 = extractedFilename ? extractedFilename.replace(/['"]/g, '') : fileName_1;
1214
1215
  }
1215
- };
1216
- createDialog(parent, 'Error', result);
1217
- parent.trigger('failure', downloadArgs);
1218
- }
1219
- });
1220
- fetch_1.send(JSON.stringify(downloadArgs.data));
1216
+ else {
1217
+ fileName_1 = parent.itemData.length > 1 ? 'files.zip' : getValue('isFile', parent.itemData[0]) ? getValue('name', parent.itemData[0]) : getValue('name', parent.itemData[0]) + '.zip';
1218
+ }
1219
+ },
1220
+ onSuccess: function (e) {
1221
+ parent.trigger('success', downloadArgs);
1222
+ var blob = e;
1223
+ var blobUrl = URL.createObjectURL(blob);
1224
+ var link = document.createElement('a');
1225
+ link.href = blobUrl;
1226
+ link.download = fileName_1;
1227
+ document.body.appendChild(link);
1228
+ link.click();
1229
+ document.body.removeChild(link);
1230
+ },
1231
+ onFailure: function (e) {
1232
+ var result = {
1233
+ error: {
1234
+ code: e.status.toString(),
1235
+ message: getLocaleText(parent, 'Network-Error') + ' ' + parent.ajaxSettings.downloadUrl
1236
+ }
1237
+ };
1238
+ createDialog(parent, 'Error', result);
1239
+ parent.trigger('failure', downloadArgs);
1240
+ }
1241
+ });
1242
+ fetch_1.send(JSON.stringify(downloadArgs.data));
1243
+ }
1244
+ catch (error) {
1245
+ handleCatchError(parent, error, 'download');
1246
+ }
1221
1247
  }
1222
1248
  }
1223
1249
  });
1224
1250
  }
1251
+ /**
1252
+ * Function for on catch handler in File Manager.
1253
+ *
1254
+ * @param {IFileManager} parent - specifies the parent element.
1255
+ * @param {any} error - specifies the catch error.
1256
+ * @param {string} action - specifies the action.
1257
+ * @returns {void}
1258
+ * @private
1259
+ */
1260
+ function handleCatchError(parent, error, action) {
1261
+ var errorResult = {
1262
+ files: null,
1263
+ error: {
1264
+ message: error.message,
1265
+ fileExists: null
1266
+ }
1267
+ };
1268
+ onFailure(parent, errorResult, action);
1269
+ }
@@ -27,6 +27,7 @@ export declare class DetailsView {
27
27
  private isRendered;
28
28
  private isLoaded;
29
29
  private isNameWidth;
30
+ private isMultiSelect;
30
31
  gridObj: Grid;
31
32
  pasteOperation: boolean;
32
33
  uploadOperation: boolean;
@@ -39,6 +39,7 @@ var DetailsView = /** @class */ (function () {
39
39
  this.isRendered = true;
40
40
  this.isLoaded = false;
41
41
  this.isNameWidth = false;
42
+ this.isMultiSelect = false;
42
43
  this.pasteOperation = false;
43
44
  this.uploadOperation = false;
44
45
  Grid.Inject(Resize, ContextMenu, Sort, VirtualScroll);
@@ -1038,10 +1039,7 @@ var DetailsView = /** @class */ (function () {
1038
1039
  DetailsView.prototype.createDragObj = function () {
1039
1040
  var _this = this;
1040
1041
  if (this.gridObj) {
1041
- if (this.parent.allowDragAndDrop) {
1042
- if (this.dragObj) {
1043
- this.dragObj.destroy();
1044
- }
1042
+ if (this.parent.allowDragAndDrop && isNullOrUndefined(this.dragObj)) {
1045
1043
  this.dragObj = new Draggable(this.gridObj.element, {
1046
1044
  cursorAt: this.parent.dragCursorPosition,
1047
1045
  distance: 5,
@@ -1059,6 +1057,7 @@ var DetailsView = /** @class */ (function () {
1059
1057
  }
1060
1058
  else if (!this.parent.allowDragAndDrop && this.dragObj) {
1061
1059
  this.dragObj.destroy();
1060
+ this.dragObj = null;
1062
1061
  }
1063
1062
  }
1064
1063
  };
@@ -1132,6 +1131,17 @@ var DetailsView = /** @class */ (function () {
1132
1131
  };
1133
1132
  this.parent.trigger('fileSelection', eventArgs);
1134
1133
  args.cancel = eventArgs.cancel;
1134
+ if (!this.isMultiSelect) {
1135
+ this.isMultiSelect = true;
1136
+ if ((args.isShiftPressed || args.isCtrlPressed) && !this.parent.allowMultiSelection && (args.target && args.target.parentElement && !args.target.parentElement.classList.contains('e-checkbox-wrapper'))) {
1137
+ args.cancel = true;
1138
+ var rowIndex = (args && args.rowIndexes)
1139
+ ? args.rowIndexes[args.rowIndexes.length - 1]
1140
+ : args.rowIndex;
1141
+ this.gridObj.selectRow(rowIndex);
1142
+ }
1143
+ this.isMultiSelect = false;
1144
+ }
1135
1145
  };
1136
1146
  /* istanbul ignore next */
1137
1147
  DetailsView.prototype.onSelected = function (args) {
@@ -692,7 +692,6 @@ var LargeIconsView = /** @class */ (function () {
692
692
  if (toBind) {
693
693
  this.clickObj = new Touch(this.element, {
694
694
  tap: function (eve) {
695
- eve.originalEvent.preventDefault();
696
695
  if (_this.parent.isDevice) {
697
696
  _this.tapCount = eve.tapCount;
698
697
  _this.tapEvent = eve;
@@ -93,10 +93,7 @@ var NavigationPane = /** @class */ (function () {
93
93
  NavigationPane.prototype.addDragDrop = function () {
94
94
  var _this = this;
95
95
  if (!this.parent.isMobile && this.treeObj) {
96
- if (this.parent.allowDragAndDrop) {
97
- if (this.dragObj) {
98
- this.dragObj.destroy();
99
- }
96
+ if (this.parent.allowDragAndDrop && isNOU(this.dragObj)) {
100
97
  this.dragObj = new Draggable(this.treeObj.element, {
101
98
  cursorAt: this.parent.dragCursorPosition,
102
99
  dragTarget: '.' + CLS.FULLROW,
@@ -114,6 +111,7 @@ var NavigationPane = /** @class */ (function () {
114
111
  }
115
112
  else if (!this.parent.allowDragAndDrop && this.dragObj) {
116
113
  this.dragObj.destroy();
114
+ this.dragObj = null;
117
115
  }
118
116
  }
119
117
  };
@@ -623,7 +621,7 @@ var NavigationPane = /** @class */ (function () {
623
621
  };
624
622
  /* istanbul ignore next */
625
623
  NavigationPane.prototype.checkDropPath = function (args) {
626
- if (isFileSystemData(this.parent) && this.parent.path === this.parent.dropPath || this.parent.targetModule === 'navigationpane') {
624
+ if (isFileSystemData(this.parent) && (this.parent.path === this.parent.dropPath || this.parent.targetModule === 'navigationpane')) {
627
625
  return;
628
626
  }
629
627
  if (this.parent.hasId) {