Skip to content

Commit

Permalink
Fixed error in IE7 when trying to access elements in iframe as part o…
Browse files Browse the repository at this point in the history
…f a beforeunload event.
  • Loading branch information
micmath committed Oct 5, 2009
1 parent 9d614c4 commit 22ece81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/widgets/editor/editor.js
Expand Up @@ -1505,8 +1505,10 @@ Idler.prototype._stop = function() {
// see Webkit bug related to onbeforeunload and iframes
// https://bugs.webkit.org/show_bug.cgi?id=21699
// http://code.google.com/p/chromium/issues/detail?id=5773
events.addListener(that.element[0].contentWindow, 'beforeunload', function () { that.editor.commit(); return true; } );
events.addListener(window, 'beforeunload', function () { that.editor.commit(); return true; } );
if (glow.env.webkit) {
events.addListener(that.element[0].contentWindow, 'beforeunload', function () { that.editor.commit(); return true; } );
events.addListener(window, 'beforeunload', function () { that.editor.commit(); return true; } );
}

// Give the toolbar one focusable button
// Boolean that we use to make sure we only do this once
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/widgets.editor.css
Expand Up @@ -160,7 +160,7 @@
.glowCSSVERSION-editor .glowCSSVERSION-hidden { position: absolute; left: -2500px; width: 1px; }

/* without images */
.glowCSSVERSION-basic .glowCSSVERSION-editor .editor-toolbar-icon span { border: none; height: auto; overflow: normal; width: auto; }
.glowCSSVERSION-basic .glowCSSVERSION-editor .editor-toolbar-icon span { border: none; height: auto; overflow: hidden; width: auto; }
.glowCSSVERSION-basic .glowCSSVERSION-editor .editor-toolbar-item .hover span span { border: 1px solid #000; }

.glowCSSVERSION-editor iframe { border: 0; margin: 0; padding: 0; width: 100%; }
Expand Down

0 comments on commit 22ece81

Please sign in to comment.