开发者

FileUpload.reset() has different behavior for IE, Chrome

开发者 https://www.devze.com 2023-03-15 19:46 出处:网络
I tried to create a fileUploader with GWT. Here is the problem, while I was adding ChangeHandler to fileUploader, I found that the behavior of IE and Chrome are different. If I choose the same file I

I tried to create a fileUploader with GWT. Here is the problem, while I was adding ChangeHandler to fileUploader, I found that the behavior of IE and Chrome are different. If I choose the same file I uploaded, IE will trigger the onChange(), while Chrome won't. That's too weird. Can anybody tells me if it is a bug of GWT of开发者_高级运维 not??

    FileUpload fileUploader = new FileUpload();    
    fileUploader.addChangeHandler(new ChangeHandler(){
        @Override
        public void onChange(ChangeEvent event)
        {
            submitButton.setEnabled(true);
        }
    });


There are browser discrepancies that GWT cannot hide. The only mean to really reset a FileUpload in a cross-browser way, is to create a new one to replace the previous instance.

0

精彩评论

暂无评论...
验证码 换一张
取 消