Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

File input display wrong under Opera #22

Closed
dingram opened this Issue · 5 comments

2 participants

@dingram

In doFile():
.change(function(){
var filename = $el.val();
filename = filename.split("/");
filename = filename[(filename.length-1)];
filenameTag.text($el.val());
})
should probably read:
.change(function(){
var filename = $(this).val();
filename = filename.split(/[\/\]/);
filename = filename[(filename.length-1)];
filenameTag.text(filename);
})
In order to split filenames on both forward and backward slashes. Also, I have fixed the fact that filename is calculated and then ignored. I have also incorporated the fix from larsboldt in Issue #13 when getting the filename.

@pixelmatrix
Owner

Good catch. I didn't notice that Opera does this differently. Do you want to submit a patch for this?

@dingram

Pull request sent from my branch

@dingram

Note that my patch isn't rigorously tested -- I just checked the regex worked as I expected.

@pixelmatrix
Owner

Thanks dingram. I'll probably merge your patch and convert to spaces as that's what I normally use. Tabs must have been set up from the first version of the plugin.

@dingram

I've just re-pushed my branch with spaces instead -- I prefer them myself.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.