-
Notifications
You must be signed in to change notification settings - Fork 295
[RTE] Focus fixes #5739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: unstable
Are you sure you want to change the base?
[RTE] Focus fixes #5739
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,8 +15,9 @@ export function useEditor() { | |
| const isReady = ref(false); | ||
| const isFocused = ref(false); | ||
|
|
||
| const initializeEditor = (content, mode = 'edit') => { | ||
| const initializeEditor = (content, mode = 'edit', { autofocus = false } = {}) => { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. praise: Clean approach — destructuring with a default empty object keeps the existing call sites working while making |
||
| editor.value = new Editor({ | ||
| autofocus, | ||
| editable: mode === 'edit', | ||
| extensions: [ | ||
| StarterKitExtension.configure({ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,7 @@ export function useImageHandling(editor) { | |
| modalInitialData.value = {}; | ||
| editingNodePos.value = null; | ||
| closeModalBase(); | ||
| editor.value?.commands.focus(); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. praise: Good consistent pattern across all three modal composables — |
||
| }; | ||
|
|
||
| setupClickOutside('.image-upload-modal', closeModal); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is absolutely out of scope for this fix, but request that we add
border: 1px solid #b4b4b4;for consistency with the other text boxes, without having to open a separate PR for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added the line: