Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In some explorer won't show the file selection dialog #49

Open
magicgis opened this issue Jun 5, 2020 · 1 comment
Open

In some explorer won't show the file selection dialog #49

magicgis opened this issue Jun 5, 2020 · 1 comment

Comments

@magicgis
Copy link

magicgis commented Jun 5, 2020

In some explorer won't show the file selection dialog,because in the "_showDialog" function,the element input should putinto the document node,here is the original code:
ImageTool.prototype._showDialog = function() {
var acceptedMIMEStr = this.options.acceptedMIMETypes.join(',');
var $el = $('');
$el.on('change', this._processFileInput.bind(this));
$el.click();
};
and the below one will work:

ImageTool.prototype._showDialog = function() {
var acceptedMIMEStr = this.options.acceptedMIMETypes.join(',');
var $el = $('');
$el.on('change', this._processFileInput.bind(this));
$(document.body).append($el);
$el.click();
$(document.body).remove($el);
};

and also the BackgroundImageTool plugin in the "BackgroundImageTool.prototype._showDialog" function should modify as above。

@extremeCrazyCoder
Copy link
Contributor

extremeCrazyCoder commented Jun 8, 2020

you could create a PR for that
didn't experience that myself, but I could think that some browsers are picky about that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants