From: Alan Date: Wed, 25 Aug 2021 09:29:01 +0000 (+0800) Subject: fix button upload - due to adding preventDefault on buttons X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=3241792a0bbf956ee55538eb0f33bfc6615e5d1f fix button upload - due to adding preventDefault on buttons --- diff --git a/docs/src/Roo_bootstrap_ButtonUploader.js.html b/docs/src/Roo_bootstrap_ButtonUploader.js.html index 1005febc64..ba99bc2f01 100644 --- a/docs/src/Roo_bootstrap_ButtonUploader.js.html +++ b/docs/src/Roo_bootstrap_ButtonUploader.js.html @@ -60,23 +60,13 @@ getAutoCreate : function() { - var im = { - tag: 'input', - type : 'file', - cls : 'd-none roo-card-upload-selector' - }; - if (this.multiple) { - im.multiple = 'multiple'; - } return { cls :'div' , cn : [ - Roo.bootstrap.Button.prototype.getAutoCreate.call(this), - im - - ] + Roo.bootstrap.Button.prototype.getAutoCreate.call(this) + ] }; @@ -96,10 +86,18 @@ (window.URL && URL.revokeObjectURL && URL) || (window.webkitURL && webkitURL); + var im = { + tag: 'input', + type : 'file', + cls : 'd-none roo-card-upload-selector' + }; + if (this.multiple) { + im.multiple = 'multiple'; + } + this.selectorEl = Roo.get(document.body).createChild(im); // so it does not capture click event for navitem. - - this.selectorEl = this.el.select('.roo-card-upload-selector', true).first(); + //this.selectorEl = this.el.select('.roo-card-upload-selector', true).first(); this.selectorEl.on('change', this.onFileSelected, this);