Skip to content

Commit

Permalink
fix: enable pane content focus on mount (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwalley committed Aug 31, 2022
1 parent 9d13519 commit bfb34cd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/allotment.module.css
Expand Up @@ -33,10 +33,6 @@
white-space: initial;
}

.splitView > .splitViewContainer > .splitViewView:not(.visible) {
display: none;
}

.splitView.vertical > .splitViewContainer > .splitViewView {
width: 100%;
}
Expand Down
2 changes: 1 addition & 1 deletion src/allotment.tsx
Expand Up @@ -295,7 +295,7 @@ const Allotment = forwardRef<AllotmentHandle, AllotmentProps>(
/**
* Add, remove or update views as children change
*/
useEffect(() => {
useIsomorphicLayoutEffect(() => {
if (dimensionsInitialized) {
const keys = childrenArray.map((child) => child.key as string);
const panes = [...previousKeys.current];
Expand Down
3 changes: 1 addition & 2 deletions src/split-view/split-view.ts
Expand Up @@ -176,7 +176,7 @@ abstract class ViewItem {
if (typeof size === "number") {
this._size = size;
this._cachedVisibleSize = undefined;
container.classList.add("split-view-view-visible", styles.visible);
container.classList.add("split-view-view-visible");
} else {
this._size = 0;
this._cachedVisibleSize = size.cachedVisibleSize;
Expand Down Expand Up @@ -225,7 +225,6 @@ abstract class ViewItem {
this.size = 0;
}

this.container.classList.toggle(styles.visible, visible);
this.container.classList.toggle("split-view-view-visible", visible);

if (this.view.setVisible) {
Expand Down

0 comments on commit bfb34cd

Please sign in to comment.