Skip to content

Commit

Permalink
JS-3652: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ra3orblade committed Dec 28, 2023
1 parent 657f440 commit d46b735
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ts/component/block/dataview/view/grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,14 @@ const ViewGrid = observer(class ViewGrid extends React.Component<I.ViewComponent
const x = cell.position().left;
const width = content.outerWidth();
const sx = scroll.scrollLeft();
const sw = scroll.width();
const container = $(UtilCommon.getBodyContainer(isPopup ? 'popup' : 'page'));
const ww = container.width();
const rx = x - sx + width;

content.css({ left: 0, right: 'auto' });

if (x - sx + width >= ww - 92) {
if ((rx >= ww - 92) || (rx > sw)) {
content.css({ left: 'auto', right: 0 });
};
};
Expand Down

0 comments on commit d46b735

Please sign in to comment.