Skip to content

Commit

Permalink
Fixing: #843 problem with onchange callback (#1310)
Browse files Browse the repository at this point in the history
* Fixing: #843 problem with onchange callback

* Update docs/CHANGELOG.md

Co-authored-by: Peter Savchenko <[email protected]>

Co-authored-by: Peter Savchenko <[email protected]>
  • Loading branch information
robonetphy and neSpecc authored Sep 26, 2020
1 parent c1f9dd6 commit 83131d6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/editor.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/components/block-tunes/block-tune-move-up.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
1 change: 1 addition & 0 deletions src/components/modules/modificationsObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export default class ModificationsObserver extends Module {
*/
window.setTimeout(() => {
this.setObserver();
this.updateNativeInputs();
}, 1000);
}

Expand Down

0 comments on commit 83131d6

Please sign in to comment.