mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-24 08:12:24 +02:00
Desktop: Allow creating new note when multiple notes are selected
This commit is contained in:
parent
4e0f4397b2
commit
a3e74320fa
@ -481,11 +481,13 @@ class NoteTextComponent extends React.Component {
|
||||
if (this.props.newNote) {
|
||||
const focusSettingName = !!note.is_todo ? 'newTodoFocus' : 'newNoteFocus';
|
||||
|
||||
if (Setting.value(focusSettingName) === 'title') {
|
||||
if (this.titleField_) this.titleField_.focus();
|
||||
} else {
|
||||
if (this.editor_) this.editor_.editor.focus();
|
||||
}
|
||||
requestAnimationFrame(() => {
|
||||
if (Setting.value(focusSettingName) === 'title') {
|
||||
if (this.titleField_) this.titleField_.focus();
|
||||
} else {
|
||||
if (this.editor_) this.editor_.editor.focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (this.editor_) {
|
||||
|
@ -639,6 +639,10 @@ const reducer = (state = defaultState, action) => {
|
||||
|
||||
newState = Object.assign({}, state);
|
||||
newState.newNote = action.item;
|
||||
if (newState.selectedNoteIds.length > 1) {
|
||||
newState.selectedNoteIds = newState.selectedNoteIds.slice();
|
||||
newState.selectedNoteIds = [newState.selectedNoteIds[0]];
|
||||
}
|
||||
break;
|
||||
|
||||
case 'CLIPPER_SERVER_SET':
|
||||
|
Loading…
Reference in New Issue
Block a user