FIX: waits libs (highlightjs) to process post before acting
This commit is contained in:
parent
41408e51fa
commit
b2400e1255
|
@ -201,22 +201,24 @@
|
||||||
processChange($cooked, inputEvent, mappings);
|
processChange($cooked, inputEvent, mappings);
|
||||||
}, 250)
|
}, 250)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Ember.run.later(() => {
|
||||||
|
// trigger fake event to setup initial state
|
||||||
|
Object.keys(placeholders).forEach(placeholderKey => {
|
||||||
|
const placeholder = placeholders[placeholderKey];
|
||||||
|
|
||||||
// trigger fake event to setup initial state
|
const value =
|
||||||
Object.keys(placeholders).forEach(placeholderKey => {
|
placeholder.default ||
|
||||||
const placeholder = placeholders[placeholderKey];
|
(placeholder.defaults.length && !placeholder.description
|
||||||
|
? placeholder.defaults[0]
|
||||||
|
: null);
|
||||||
|
|
||||||
const value =
|
processChange(
|
||||||
placeholder.default ||
|
$cooked,
|
||||||
(placeholder.defaults.length && !placeholder.description
|
{ target: { value, dataset: { key: placeholderKey } } },
|
||||||
? placeholder.defaults[0]
|
mappings
|
||||||
: null);
|
);
|
||||||
|
});
|
||||||
processChange(
|
}, 500);
|
||||||
$cooked,
|
|
||||||
{ target: { value, dataset: { key: placeholderKey } } },
|
|
||||||
mappings
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue