getAllInputs refactored

This commit is contained in:
khaydarov 2016-07-13 20:16:01 +03:00
parent 9425e17598
commit aa383f5a72

View file

@ -484,21 +484,8 @@ cEditor.ui = {
setTimeout(function () {
var inputs = redactor.querySelectorAll('[contenteditable]');
for (var key in inputs) {
/**
* querySelectorAll('[contenteditable]') returns object methods like length, keys and so on.
* We need to get only DOM elements
*/
if (cEditor.core.isDomNode(inputs[key])) {
elements[key] = inputs[key];
}
}
/** Save all inputs in global variable state */
cEditor.state.inputs = elements;
cEditor.state.inputs = redactor.querySelectorAll('[contenteditable]');
}, 10);