Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

File input display wrong under Opera #22

Closed
dingram opened this issue Feb 22, 2010 · 5 comments
Closed

File input display wrong under Opera #22

dingram opened this issue Feb 22, 2010 · 5 comments

Comments

@dingram
Copy link
Contributor

dingram commented Feb 22, 2010

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
Copy link
Collaborator

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

@dingram
Copy link
Contributor Author

dingram commented Feb 22, 2010

Pull request sent from my branch

@dingram
Copy link
Contributor Author

dingram commented Feb 22, 2010

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

@pixelmatrix
Copy link
Collaborator

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
Copy link
Contributor Author

dingram commented Feb 22, 2010

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

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants