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

IE9多个FileUpload组件共存问题 #41

Open
leverz opened this issue Apr 13, 2017 · 2 comments
Open

IE9多个FileUpload组件共存问题 #41

leverz opened this issue Apr 13, 2017 · 2 comments

Comments

@leverz
Copy link

leverz commented Apr 13, 2017

在我的页面中有需要使用多个FileUpload组件实现上传功能。
然而我发现,在IE9中,如果在同一个页面中使用多个FileUpload组件只有第一个上传按钮会生效。
查看代码发现,你们在处理IE9的多文件上传时,针对每次上传都创建了一个独立的form表单。你们用全局变量currentIEID用来区分每个新增的form。
我认为这里的关键问题就是你们使用了全局变量作为区分,如果我需要实例化多个FileUpload组件,各个FileUpload组件之间将无法区分。

@leverz
Copy link
Author

leverz commented Apr 13, 2017

我通过修改你们的代码,已经修复了这个bug。

@leverz
Copy link
Author

leverz commented Apr 13, 2017

我首先保留了全局的currentIEID,在多个FileUpload组件的情况下,每个FileUpload的初始ID都是从currentIEID这里读取。
我在组件内部的添加了另一份currentIEID,作为每个组件内部维护的,主要是为了防止修改bug影响到多文件上传。IE9中每个form表单的唯一标示通过计算全局的currentIEID和组件内部的currentIEID得出。

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

1 participant