Skip to content

Commit

Permalink
fix: refocus sheet cell when create new sheet (#1896)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jocs authored Apr 15, 2024
1 parent a717c32 commit db88447
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export class EditorBridgeController extends RxDisposable {
}

const textSelectionRenderManager = this._injector.get(ITextSelectionRenderManager, Quantity.OPTIONAL);

if (!this._layoutService.checkCanvasIsFocused() && textSelectionRenderManager && !textSelectionRenderManager!.hasFocus()) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/services/layout/layout.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { IEditorService } from '../editor/editor.service';
type FocusHandlerFn = (unitId: string) => void;

export const FOCUSING_UNIVER = 'FOCUSING_UNIVER';
const collectionOfCnForFocusableEle = ['univer-app-layout', 'univer-toolbar-btn', 'univer-menu-item', 'univer-button'];
const collectionOfCnForFocusableEle = ['univer-app-layout', 'univer-toolbar-btn', 'univer-menu-item', 'univer-button', 'univer-sheet-bar-btn'];

export interface ILayoutService {
readonly isFocused: boolean;
Expand Down

0 comments on commit db88447

Please sign in to comment.