Skip to content

Commit

Permalink
Avoid adding to browser history when setting location on iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
hofmeister committed Feb 19, 2014
1 parent 058fae2 commit 0dc51c5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions js/lib/widget.js
Expand Up @@ -1464,14 +1464,14 @@ $wb.ui.IFrame = $wb.Class('IFrame', {
//Or else this may cause leaks. //Or else this may cause leaks.
try { try {
this.doc().remove(); this.doc().remove();
} catch (e) { } catch (e) {}
}
;


this._showLoadScreen(); this._showLoadScreen();
this.opts.src = "" + arguments[0]; this.opts.src = "" + arguments[0];
if (this.window()) if (this.window()) {
this.window().location = this.opts.src; this.window().location.replace(this.opts.src);
}

if (this.opts.src === this.opts.blankSrc) if (this.opts.src === this.opts.blankSrc)
this.showBlankScreen(); this.showBlankScreen();
return this; return this;
Expand All @@ -1492,6 +1492,7 @@ $wb.ui.IFrame = $wb.Class('IFrame', {
} }
if (this.opts.showBlankScreen if (this.opts.showBlankScreen
&& ((this.opts.src === this.opts.blankSrc) || force)) { && ((this.opts.src === this.opts.blankSrc) || force)) {
console.log('Show blank screen',this.opts,force);
this._loadScreen.html(this.opts.blankScreenText); this._loadScreen.html(this.opts.blankScreenText);
this._loadScreen.outerWidth(this.target().outerWidth()); this._loadScreen.outerWidth(this.target().outerWidth());
this._loadScreen.outerHeight(this.target().outerHeight()); this._loadScreen.outerHeight(this.target().outerHeight());
Expand Down

0 comments on commit 0dc51c5

Please sign in to comment.