Skip to content

Commit 24d9af0

Browse files
committed
Fix submit_once Javascript function
This needs to return a boolean value (not and integer like 0 or 1). And the work-around for an ancient version of Internet Explorer would make it break for a recent Firefox. The old version would show the popup but after clicking away the alert it would load the page. The new version (tested with Chromium and Firefox) doesn't load the page.
1 parent f604b43 commit 24d9af0

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

CHANGES.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,13 @@ Fixed:
326326
classic template and setting 'superseder' to a non-existing issue
327327
number. All changes to the form where the original field was non-empty
328328
were lost.
329+
- Fix submit_once Javascript function: This needs to return a boolean
330+
value (not and integer like 0 or 1). And the work-around for an
331+
ancient version of Internet Explorer would make it break for a recent
332+
Firefox. The old version would show the popup but after clicking away
333+
the alert it would load the page. The new version (tested with
334+
Chromium and Firefox) doesn't load the page.
335+
329336

330337
2016-01-11: 1.5.1
331338

roundup/cgi/templating.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2826,11 +2826,10 @@ def base_javascript(self):
28262826
function submit_once() {
28272827
if (submitted) {
28282828
alert("Your request is being processed.\\nPlease be patient.");
2829-
event.returnValue = 0; // work-around for IE
2830-
return 0;
2829+
return false;
28312830
}
28322831
submitted = true;
2833-
return 1;
2832+
return true;
28342833
}
28352834
28362835
function help_window(helpurl, width, height) {

0 commit comments

Comments
 (0)