From 37f6fee0bb0dfd7325e4c1603848bc3c3997069c Mon Sep 17 00:00:00 2001 From: Christian Sterzl Date: Fri, 4 Jul 2014 15:53:33 +0200 Subject: [PATCH] Fix for IE8, test will probably fail on IE8 --- src/views/composer.observe.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/composer.observe.js b/src/views/composer.observe.js index ef096df..eb5ebbe 100644 --- a/src/views/composer.observe.js +++ b/src/views/composer.observe.js @@ -160,8 +160,11 @@ dom.observe(focusBlurElement, "blur", function(event) { if (state !== that.getValue(false, false)) { - //create change event - var changeevent = Object.create(event, { type: { value: 'change' } }); + //create change event if supported (all except IE8) + var changeevent = event; + if(typeof Object.create == 'function') { + changeevent = Object.create(event, { type: { value: 'change' } }); + } that.parent.fire("change", changeevent).fire("change:composer", changeevent); } that.parent.fire("blur", event).fire("blur:composer", event);