Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## Fixed

- **Button**: Fixed the button border style.
- **SplitLayout**: Prevented the handle position from resetting when the `split` property is changed
to the same value as before.

### Added

Expand Down
9 changes: 6 additions & 3 deletions src/vscode-split-layout/vscode-split-layout.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ describe('vscode-split-layout', () => {
});
});

it.only('should not reset handle position when split is set to the same value', async () => {
it('should not reset handle position when split is set to the same value', async () => {
const el = await fixture<VscodeSplitLayout>(
html`<vscode-split-layout
style="width: 500px; height: 500px;"
Expand All @@ -667,12 +667,15 @@ describe('vscode-split-layout', () => {
await el.updateComplete;

const handle = el.shadowRoot!.querySelector('.handle') as HTMLDivElement;
expect(handle.offsetTop).to.eq(198);
await dragElement(handle, 0, 50);

const handleYPosBefore = handle.offsetTop;

el.setAttribute('split', 'horizontal');
await el.updateComplete;

expect(handle.offsetTop).to.eq(198);
expect(handleYPosBefore).to.eq(248);
expect(handle.offsetTop).to.eq(248);
});

// TODO
Expand Down
Loading