mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-24 18:12:48 +03:00
Fix commit dialog backspace bug
- place curstor at end of commit title when backspacing from empty description
This commit is contained in:
parent
f67744eea1
commit
8f052c04b7
@ -161,7 +161,10 @@
|
||||
const value = e.currentTarget.value;
|
||||
if (e.key === 'Backspace' && value.length === 0) {
|
||||
e.preventDefault();
|
||||
titleTextArea?.focus();
|
||||
if (titleTextArea) {
|
||||
titleTextArea?.focus();
|
||||
titleTextArea.selectionStart = titleTextArea.textLength;
|
||||
}
|
||||
useAutoHeight(e.currentTarget);
|
||||
} else if (e.key === 'a' && (e.metaKey || e.ctrlKey) && value.length === 0) {
|
||||
// select previous textarea on cmd+a if this textarea is empty
|
||||
|
Loading…
Reference in New Issue
Block a user