Fixing: #843 problem with onchange callback (#1310)

* Fixing: #843 problem with onchange callback

* Update docs/CHANGELOG.md

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
This commit is contained in:
Umang G. Patel 2020-09-26 09:22:53 +05:30 committed by GitHub
commit 83131d6251
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 2 deletions

2
dist/editor.js vendored

File diff suppressed because one or more lines are too long

View file

@ -17,6 +17,7 @@
- `Fix` - Fixed issue with enter key in inputs and textareas [#920](https://github.com/codex-team/editor.js/issues/920)
- `Improvements` - Allowed to set `false` as `toolbox` config in order to hide Toolbox button [#1221](https://github.com/codex-team/editor.js/issues/1221)
- `Fix` - blocks.getBlockByIndex() API method now returns void for indexes out of range [#1270](https://github.com/codex-team/editor.js/issues/1270)
- `Fix` - Fixed the `onChange` callback issue. This method didn't be called for native inputs before some contentedtable element changed [#843](https://github.com/codex-team/editor.js/issues/843)
### 2.18

View file

@ -84,7 +84,7 @@ export default class MoveUpTune implements BlockTune {
const currentBlock = this.api.blocks.getBlockByIndex(currentBlockIndex);
const previousBlock = this.api.blocks.getBlockByIndex(currentBlockIndex - 1);
if (!currentBlock || !previousBlock){
if (!currentBlock || !previousBlock) {
return;
}

View file

@ -69,6 +69,7 @@ export default class ModificationsObserver extends Module {
*/
window.setTimeout(() => {
this.setObserver();
this.updateNativeInputs();
}, 1000);
}