Bug 122890 - [testcase] [regression] Submitting a form that targets a frame from inside a callback doesn't work.
Summary: [testcase] [regression] Submitting a form that targets a frame from inside a ...
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 4.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-01 09:43 UTC by Martijn van der Kwast
Modified: 2009-02-21 21:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
testcase (10.00 KB, application/gzip)
2008-05-04 11:08 UTC, George Goldberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martijn van der Kwast 2006-03-01 09:43:38 UTC
Version:           3.5.1 (using KDE 3.5.1, Kubuntu Package 4:3.5.1-0ubuntu0breezy1 )
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.12-10-686

- Using submit_form() in this example submits the form like expected.

- Using delay_submit_form() causes submit_form() to be called, but f.submit() seems to be ignored.

- Adding an alert statement to the function that contains window.setTimeOut make the form submit.

- The behaviour can also be observed when you try to submit a form in a callback function for a XHR request instead of using window.setTimeout() .

You can see a live example of these cases at http://www.stilglog.com/kbug .


<pre><code>
<head>
	<script type="text/javascript">
		function submit_form() {
			var f = document.getElementById('test');
			f.submit();
		}
		function delay_submit_form() {
			window.setTimeout('submit_form()', 1000);
			// alert('test');    // <-- adding alert here makes the form submit
		}
	</script>
</head>
<body>
	<form target="ifr" method="get" action="result.html" name="test" id="test">
		<input type="text" name="the_text" id="the_text" value="test"/>
	</form>
	<input type="button" onclick="submit_form()" value="direct"/>
	<input type="button" onclick="delay_submit_form()" value="delayed"/>
	<iframe src="blank.html" id="ifr" name="ifr"></iframe>
</body>
</code></pre>
Comment 1 Martin Fitzpatrick 2007-01-11 22:46:15 UTC
Martijn: Your examples (1, 2 & 3) now all work for me on KDE 3.5.5 / Kubuntu 6.10. 

Can you confirm that this bug is fixed, or do you continue to have problems?
Comment 2 Martijn van der Kwast 2007-01-15 16:26:01 UTC
I still have the same problem ( KDE 3.5.5 / Kubuntu 6.10 ).

Pressing the "Delayed" button in example 2 should load result.html in the iframe. This doesn't happen here.

Is there any other information I could add ?
Comment 3 George Goldberg 2008-05-04 11:08:03 UTC
Created attachment 24619 [details]
testcase

testcase attached. Bug still present in 3.5.9 as described. On svn trunk
r803492, it is actually even worse. It doesn't even work with the alert()
added.

Testcase can be seen online at
http://www.grundleborg.com/kde/bugsquad/testcases/122890
Comment 4 Maksim Orlovich 2009-02-21 21:16:13 UTC
Seems to work fine now... I think I resolved related issues at some point