From ecd9b0902d6753d9f1aff2d02ff408796d37ab3c Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Sun, 23 Aug 2015 00:23:31 +0200 Subject: [PATCH] Fix for getters/setters for property become inaccessible when property set on element before it is ready Test added --- src/standard/configure.html | 6 ++++-- test/unit/configure-elements.html | 26 +++++++++++++++++++++++++- test/unit/configure.html | 8 ++++++++ 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/standard/configure.html b/src/standard/configure.html index 8d4102a722..59bb36046a 100644 --- a/src/standard/configure.html +++ b/src/standard/configure.html @@ -114,8 +114,10 @@ _configureProperties: function(properties, config) { for (var i in properties) { var c = properties[i]; - // don't accept undefined values - if (c.value !== undefined) { + if (this[i] !== undefined) { + config[i] = this[i]; + delete this[i]; + } else if (c.value !== undefined) { var value = c.value; if (typeof value == 'function') { // pass existing config values (this._config) to value function diff --git a/test/unit/configure-elements.html b/test/unit/configure-elements.html index c3eee344ba..3778a2bd38 100644 --- a/test/unit/configure-elements.html +++ b/test/unit/configure-elements.html @@ -164,4 +164,28 @@ }); - \ No newline at end of file + + + + diff --git a/test/unit/configure.html b/test/unit/configure.html index 40381e8388..8143d2dc78 100644 --- a/test/unit/configure.html +++ b/test/unit/configure.html @@ -26,6 +26,10 @@ + + + +