diff --git a/www/drive/main.js b/www/drive/main.js
index 4d8ea4acd..bfdb22e7e 100644
--- a/www/drive/main.js
+++ b/www/drive/main.js
@@ -1777,10 +1777,10 @@ define([
draggable: draggable
});
if (Array.isArray(APP.selectedFiles)) {
- var idx = APP.selectedFiles.indexOf(id);
- if (idx !== -1) {
+ var sidx = APP.selectedFiles.indexOf(id);
+ if (sidx !== -1) {
$element.addClass('selected');
- APP.selectedFiles.splice(idx, 1);
+ APP.selectedFiles.splice(sidx, 1);
}
}
addFileData(id, $element);
diff --git a/www/pad/inner.js b/www/pad/inner.js
index b114a0ac7..cc6050f47 100644
--- a/www/pad/inner.js
+++ b/www/pad/inner.js
@@ -678,13 +678,13 @@ define([
onSelect: function (data) {
if (data.type === 'file') {
var mt = '';
- editor.insertElement(CKEDITOR.dom.element.createFromHtml(mt));
+ editor.insertElement(window.CKEDITOR.dom.element.createFromHtml(mt));
return;
}
}
};
common.initFilePicker(fileDialogCfg);
- APP.$mediaTagButton = $('