changeset 107:7f2c5d542616 extractapp

fixed form submit issue in Chrome 56.x
author Calvin Yeh <cyeh@mpipw-berlin.mpg.com>
date Tue, 21 Mar 2017 18:21:10 +0100
parents 6de4932d993b
children 025530e37dcd
files js/taggingtext.js views/Extractapp/TaggingText.php
diffstat 2 files changed, 15 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/js/taggingtext.js	Mon Aug 08 17:47:19 2016 +0200
+++ b/js/taggingtext.js	Tue Mar 21 18:21:10 2017 +0100
@@ -1449,8 +1449,12 @@
     if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
         document.body.appendChild(form);
         form.submit();
+        document.body.removeChild(form);
     } else {
-        form.submit(); // works under IE and Chrome, but not FF  
+        //form.submit(); // works under IE and Chrome, but not FF  
+        document.body.appendChild(form);
+        form.submit();
+        document.body.removeChild(form);
     }
 }
 
--- a/views/Extractapp/TaggingText.php	Mon Aug 08 17:47:19 2016 +0200
+++ b/views/Extractapp/TaggingText.php	Tue Mar 21 18:21:10 2017 +0100
@@ -501,8 +501,12 @@
     if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
         document.body.appendChild(form);
         form.submit();
+        document.body.removeChild(form);
     } else {
-        form.submit(); // works under IE and Chrome, but not FF  
+        document.body.appendChild(form);
+        form.submit();
+        document.body.removeChild(form);
+        //form.submit(); // works under IE and Chrome, but not FF  
     }
 }
 
@@ -1331,8 +1335,12 @@
     if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
         document.body.appendChild(form);
         form.submit();
+	document.body.removeChild(form);
     } else {
-        form.submit(); // works under IE and Chrome, but not FF  
+        document.body.appendChild(form);
+        form.submit();
+        document.body.removeChild(form);
+        //form.submit(); // works under IE and Chrome, but not FF  
     }
 
 }