mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
fix terminal paste handler -- use paste fn, unify key handlers. add extra if stmts to focusNode calls in block
This commit is contained in:
@@ -151,14 +151,18 @@ const BlockFull = React.memo(({ nodeModel, viewModel }: FullBlockProps) => {
|
||||
if (!focusWithin) {
|
||||
setFocusTarget();
|
||||
}
|
||||
nodeModel.focusNode();
|
||||
if (!isFocused) {
|
||||
nodeModel.focusNode();
|
||||
}
|
||||
}, [blockClicked]);
|
||||
|
||||
React.useLayoutEffect(() => {
|
||||
if (focusedChild == null) {
|
||||
return;
|
||||
}
|
||||
nodeModel.focusNode();
|
||||
if (!isFocused) {
|
||||
nodeModel.focusNode();
|
||||
}
|
||||
}, [focusedChild]);
|
||||
|
||||
// treat the block as clicked on creation
|
||||
|
||||
Reference in New Issue
Block a user