Skip to content

Commit 95f2def

Browse files
authored
Merge branch 'next' into fix-nested-focus
2 parents 2987fcc + 90d6dec commit 95f2def

File tree

8 files changed

+33
-8
lines changed

8 files changed

+33
-8
lines changed

.github/workflows/bump-version-on-merge-next.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# If pull request was merged then we should check for a package version update
1818
check-for-no-version-changing:
1919
if: github.event.pull_request.merged == true
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-latest
2121
permissions:
2222
actions: write
2323
steps:

.github/workflows/create-a-release-draft.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# If pull request was merged then we should check for a package version update
1818
check-version-changing:
1919
if: github.event.pull_request.merged == true
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-latest
2121
permissions:
2222
actions: write
2323
steps:

.github/workflows/cypress.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,19 @@ jobs:
88
matrix:
99
browser: [firefox, chrome, edge]
1010

11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-22.04
1212
steps:
13+
- uses: actions/checkout@v4
1314
- uses: actions/setup-node@v3
1415
with:
1516
node-version: 18
16-
- uses: actions/checkout@v4
17+
18+
- name: Setup Firefox
19+
if: matrix.browser == 'firefox'
20+
uses: browser-actions/setup-firefox@v1
21+
with:
22+
firefox-version: '115.0esr'
23+
1724
- uses: cypress-io/github-action@v6
1825
with:
1926
config: video=false

.github/workflows/eslint.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ on: [pull_request]
55
jobs:
66
lint:
77
name: ESlint
8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v2
1111

12+
- uses: actions/setup-node@v3
13+
with:
14+
node-version: 18
15+
1216
- name: Cache dependencies
1317
uses: actions/cache@v4
1418
with:

.github/workflows/publish-package-to-npm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
publish:
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
1111
steps:
1212
# Checkout to target branch
1313
- uses: actions/checkout@v4

docs/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
### 2.31.1
4+
5+
- `Fix` - Prevent the warning from appearing when `readOnly` mode is initially set to `true`
6+
37
### 2.31.0
48

59
- `New` - Inline tools (those with `isReadOnlySupported` specified) can now be used in read-only mode

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@editorjs/editorjs",
3-
"version": "2.31.0",
3+
"version": "2.31.1",
44
"description": "Editor.js — open source block-style WYSIWYG editor with JSON output",
55
"main": "dist/editorjs.umd.js",
66
"module": "dist/editorjs.mjs",

src/components/modules/toolbar/blockSettings.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ export default class BlockSettings extends Module<BlockSettingsNodes> {
6868
return 'flipper' in this.popover ? this.popover?.flipper : undefined;
6969
}
7070

71+
/**
72+
* Flag that indicates whether the `EditorMobileLayoutToggled` event listener is attached.
73+
*/
74+
private hasMobileLayoutToggleListener = false;
75+
7176
/**
7277
* Page selection utils
7378
*/
@@ -92,6 +97,7 @@ export default class BlockSettings extends Module<BlockSettingsNodes> {
9297
}
9398

9499
this.eventsDispatcher.on(EditorMobileLayoutToggled, this.close);
100+
this.hasMobileLayoutToggleListener = true;
95101
}
96102

97103
/**
@@ -100,7 +106,11 @@ export default class BlockSettings extends Module<BlockSettingsNodes> {
100106
public destroy(): void {
101107
this.removeAllNodes();
102108
this.listeners.destroy();
103-
this.eventsDispatcher.off(EditorMobileLayoutToggled, this.close);
109+
110+
if (this.hasMobileLayoutToggleListener) {
111+
this.eventsDispatcher.off(EditorMobileLayoutToggled, this.close);
112+
this.hasMobileLayoutToggleListener = false;
113+
}
104114
}
105115

106116
/**

0 commit comments

Comments
 (0)