tobiasquinteiro / walkaround

Automatically exported from code.google.com/p/walkaround
Apache License 2.0
0 stars 0 forks source link

Attachment upload does not work in Firefox #47

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create new wave
2. click right paperclip icon
3. select file, click "ok"

What is the expected output?  What do you see instead?
Spinner keeps going indefinitely.  Reloading the wave still shows the spinner.  
I don't think the server's /upload servlet is ever called.
Upload works on Chrome.

What browser and browser version are you using?  On what operating system?
Firefox Mac

What URL does your browser show when the problem occurs?  Did you compile
walkaround on your machine, or are you using a public instance?
deployed from trunk

Please use labels and text to provide additional information.

Original issue reported on code.google.com by oh...@google.com on 15 Jan 2012 at 3:21

GoogleCodeExporter commented 8 years ago
Firefox on Linux has the same problem.  My tests on Mac and Linux were both 
with version 9.0.1.

With a patch (below) to remove popup.hide() in UploadFormPopup, I can get 
Firefox to send some data to the server, but it seems to be incorrectly 
encoded.  The local dev_appserver runs OOM trying to parse the data Firefox 
sends.

Not investigating any further for now.

diff --git 
a/src/com/google/walkaround/wave/client/attachment/UploadFormPopup.java 
b/src/com/google/walkaround/wave/client/attachment/UploadFormPopup.java
index 063ebcc..8564ecb 100644
--- a/src/com/google/walkaround/wave/client/attachment/UploadFormPopup.java
+++ b/src/com/google/walkaround/wave/client/attachment/UploadFormPopup.java
@@ -27,6 +27,7 @@ import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
 import com.google.gwt.uibinder.client.UiHandler;
 import com.google.gwt.user.client.Event;
+import com.google.gwt.user.client.ui.Button;
 import com.google.gwt.user.client.ui.FileUpload;
 import com.google.gwt.user.client.ui.FormPanel;
 import com.google.gwt.user.client.ui.SubmitButton;
@@ -93,6 +94,8 @@ public final class UploadFormPopup {
   FileUpload file;
   @UiField
   SubmitButton submit;
+  @UiField
+  Button cancel;

   private final IFrameElement iframe;
   private final HandlerReference onloadRegistration;
@@ -147,7 +150,7 @@ public final class UploadFormPopup {
   private void destroy() {
     onloadRegistration.unregister();
     popup.hide();
-    iframe.removeFromParent();
+    //iframe.removeFromParent();
     stage = Stage.END;
     log.log(Level.INFO, "end");
   }
@@ -230,12 +233,12 @@ public final class UploadFormPopup {
   @UiHandler("submit")
   void handleSubmit(ClickEvent e) {
     Preconditions.checkState(stage == Stage.HAVE_TOKEN);
-    // The browser's default action can not be relied upon to submit the form,
-    // because this handler is removing the form from the DOM, so a manual
-    // submit is required (before hiding the popup).
     e.stopPropagation();
     form.submit();
-    popup.hide();
+    //popup.hide();
+    submit.setEnabled(false);
+    file.setEnabled(false);
+    cancel.setEnabled(false);
     stage = Stage.UPLOADING_FILE;
     log.log(Level.INFO, "posting file");
     if (listener != null) {

Original comment by oh...@google.com on 15 Jan 2012 at 7:11