Skip to content

Commit d23fd24

Browse files
author
zhourenjian
committed
Fix bug of blank title when a cross-site request is in processing
1 parent 3ccf701 commit d23fd24

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sources/net.sf.j2s.ajax/ajaxpipe/net/sf/j2s/ajax/SimplePipeRequest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,13 +434,17 @@ static void loadPipeIFrameScript(String url) {
434434
doc.open ();
435435
doc.write (html);
436436
doc.close ();
437+
// To avoid blank title in title bar
438+
document.title = document.title;
437439
} catch (e) {
438440
window.setTimeout ((function (handle, html) {
439441
return function () {
440442
var doc = handle.contentWindow.document;
441443
doc.open ();
442444
doc.write (html);
443445
doc.close ();
446+
// To avoid blank title in title bar
447+
document.title = document.title;
444448
};
445449
}) (handle, html), 25);
446450
}

0 commit comments

Comments
 (0)