From 3241792a0bbf956ee55538eb0f33bfc6615e5d1f Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 25 Aug 2021 17:29:01 +0800 Subject: [PATCH] fix button upload - due to adding preventDefault on buttons --- docs/src/Roo_bootstrap_ButtonUploader.js.html | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) 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); -- 2.39.2