mirror of
https://github.com/codex-team/editor.js
synced 2024-06-18 13:45:20 +02:00
Inline Toolbar: Selection is not reseted (#543)
* Selection is not reseted if click on toolbar borde * blue back * 'refactoring' * fix double link click * fix double link click * fix double link click * listener * 'reset' * reset fix * add missed bundles, increment version * update submodules
This commit is contained in:
parent
af4f62b254
commit
0ad9484c75
1459
build/codex-editor.js
Normal file
1459
build/codex-editor.js
Normal file
File diff suppressed because one or more lines are too long
1
build/codex-editor.js.map
Normal file
1
build/codex-editor.js.map
Normal file
File diff suppressed because one or more lines are too long
6
dist/codex-editor.js
vendored
6
dist/codex-editor.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
Subproject commit 84826bbd4a66fb4626f8813b50c0d2b1b0ecfa0f
|
||||
Subproject commit d726836684284dc988a35ac8111c5b89283afbdd
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "codex.editor",
|
||||
"version": "2.7.6",
|
||||
"version": "2.7.7",
|
||||
"description": "Codex Editor. Native JS, based on API and Open Source",
|
||||
"main": "dist/codex-editor.js",
|
||||
"types": "./types/index.d.ts",
|
||||
|
|
|
@ -118,7 +118,7 @@ export default class LinkInlineTool implements InlineTool {
|
|||
this.nodes.input.placeholder = 'Add a link';
|
||||
this.nodes.input.classList.add(this.CSS.input);
|
||||
this.nodes.input.addEventListener('keydown', (event: KeyboardEvent) => {
|
||||
if (event.keyCode === this.ENTER_KEY ) {
|
||||
if (event.keyCode === this.ENTER_KEY) {
|
||||
this.enterPressed(event);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -109,6 +109,11 @@ export default class InlineToolbar extends Module {
|
|||
this.nodes.buttons = $.make('div', this.CSS.buttonsWrapper);
|
||||
this.nodes.actions = $.make('div', this.CSS.actionsWrapper);
|
||||
|
||||
// To prevent reset of a selection when click on the wrapper
|
||||
this.Editor.Listeners.on(this.nodes.wrapper, 'mousedown', (event) => {
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
/**
|
||||
* Append Inline Toolbar to the Editor
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue