mirror of https://github.com/laurent22/joplin.git
focus NoteText only when creating new notes
This changes the behaviour so that loading a note does automatically focus the note text/title only when a new note is being created. This reduces accidental edits and is in line with other note taking applications such as Simplenote, Evernote and Apple Notes.pull/676/head
parent
f63668350b
commit
c4411bb895
|
@ -342,9 +342,8 @@ class NoteTextComponent extends React.Component {
|
|||
this.editorSetScrollTop(1);
|
||||
this.restoreScrollTop_ = 0;
|
||||
|
||||
// If a search is in progress we don't focus any field otherwise it will
|
||||
// take the focus out of the search box.
|
||||
if (note && this.props.notesParentType !== 'Search') {
|
||||
// Only force focus on notes when creating a new note/todo
|
||||
if (this.props.newNote) {
|
||||
const focusSettingName = !!note.is_todo ? 'newTodoFocus' : 'newNoteFocus';
|
||||
|
||||
if (Setting.value(focusSettingName) === 'title') {
|
||||
|
|
Loading…
Reference in New Issue