Skip to content

Commit

Permalink
New version 4.0.0-beta.116 Read more https://github.com/xdan/jodit/bl…
Browse files Browse the repository at this point in the history
  • Loading branch information
xdan committed Dec 11, 2023
1 parent 30f3f16 commit 1681e89
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jodit",
"version": "4.0.0-beta.115",
"version": "4.0.0-beta.116",
"description": "Jodit is awesome and usefully wysiwyg editor with filebrowser",
"main": "build/jodit.min.js",
"types": "./types/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/modules/toolbar/collection/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class ToolbarCollection<T extends IViewWithToolbar = IViewWithToolbar>

super.update();

this.j.e.fire('afterUpdateToolbar');
this.j.e.fire('afterUpdateToolbar', this);
}

@debounce()
Expand Down
16 changes: 12 additions & 4 deletions src/modules/toolbar/toolbar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ describe('Toolbar', function () {
const editor = getJodit({
defaultTimeout: 100
});

let count = 0;
const spy = () => {
count++;
const spy = collection => {
if (collection === editor.toolbar) {
count++;
}
};

editor.events.on('afterUpdateToolbar', spy);
editor.value = 'test';
editor.value = 'test2';
Expand All @@ -34,10 +38,14 @@ describe('Toolbar', function () {
const editor = getJodit({
defaultTimeout: 0
});

let count = 0;
const spy = () => {
count++;
const spy = collection => {
if (collection === editor.toolbar) {
count++;
}
};

editor.events.on('afterUpdateToolbar', spy);
editor.value = 'test';
editor.value = 'test2';
Expand Down

0 comments on commit 1681e89

Please sign in to comment.