Skip to content

Commit

Permalink
#6163 Scroll bar in the Property Grid is not responding to clicks (#6165
Browse files Browse the repository at this point in the history
)

Fixes #6163
  • Loading branch information
novikov82 authored Nov 30, 2024
1 parent 76be17d commit 8eb1827
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
15 changes: 15 additions & 0 deletions functionalTests/property-grid/survey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,19 @@ test("Drop-down menus do not close on second click", async (t) => {

.click(panel.find(".spg-panel__content"), { offsetX: 10, offsetY: 10 })
.expect(popupContainer.visible).notOk();
});

test("tabbed mode", async (t) => {
const json = {
elements: [
{
type: "dropdown",
name: "q1",
title: "title"
}
]
};
await setJSON(json);
await t.hover(Selector(".svc-side-bar .svc-scroll__wrapper").filterVisible());
await t.expect(Selector(".svc-side-bar .svc-scroll__scrollbar").visible).notOk();
});
4 changes: 2 additions & 2 deletions packages/survey-creator-core/src/components/scroll.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
overflow-x: hidden;
width: fit-content;
margin-inline-start: -1px;
display: none;
visibility: hidden;
z-index: 30;
inset-inline-end: 0;
inset-inline-start: initial;
Expand All @@ -44,7 +44,7 @@
}

.svc-scroll__wrapper:hover .svc-scroll__scrollbar {
display: block;
visibility: visible;
}

.svc-scroll__scrollbar-sizer {
Expand Down
1 change: 1 addition & 0 deletions packages/survey-creator-core/src/components/scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class ScrollViewModel {
? entry.contentBoxSize[0].blockSize
: entry.contentRect.width;
this._scrollbarSizerElement.style.height = height + "px";
this._scrollbarElement.style.visibility = this._scrollbarElement.clientHeight >= height ? "hidden" : "";
}
});
this._containerBodyResizeObserver.observe(this._containerBodyElement);
Expand Down

0 comments on commit 8eb1827

Please sign in to comment.