Skip to content

Commit

Permalink
Fix #144 Does not work on IE8 - polyfills not initiated to iframe window
Browse files Browse the repository at this point in the history
Fix Placeholder and InternetExplorer #55
  • Loading branch information
Oliver Pulges committed Feb 17, 2015
1 parent f04e11e commit ad502cc
Show file tree
Hide file tree
Showing 6 changed files with 290 additions and 339 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ module.exports = function(grunt) {

// List required source files that will be built into wysihtml5x.js
var base = [
"src/polyfills.js",
"src/wysihtml5.js",
"src/polyfills.js",
"node_modules/rangy/lib/rangy-core.js",
"node_modules/rangy/lib/rangy-selectionsaverestore.js",
"lib/base/base.js",
Expand Down
4 changes: 4 additions & 0 deletions src/dom/sandbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@
this._unset(iframeDocument, "cookie", "", true);
}

if (wysihtml5.polyfills) {
wysihtml5.polyfills(iframeWindow, iframeDocument);
}

this.loaded = true;

// Trigger the callback
Expand Down
2 changes: 1 addition & 1 deletion src/dom/simulate_placeholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
dom.removeClass(view.element, CLASS_NAME);
},
set = function() {
if (view.isEmpty()) {
if (view.isEmpty() && !view.placeholderSet) {
view.placeholderSet = true;
view.setValue(placeholderText);
dom.addClass(view.element, CLASS_NAME);
Expand Down
Loading

0 comments on commit ad502cc

Please sign in to comment.