Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore Code type cells in horizontalScrollbar #24576

Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ export class CodeComponent extends CellView implements OnInit, OnChanges {
// Have to offset the height based on the contents viewport and the additional scrollbars that are present in markdown editor and notebook
let horizontalTop = Math.floor(Math.abs(viewportTop + viewportHeight) - Math.abs(2 * horizontalScrollbar.scrollHeight));

// Set opacity for both fixed and absolute
horizontalScrollbar.style.opacity = '1';
// Set display for both fixed and absolute
horizontalScrollbar.style.display = 'block';

// If the bottom of the editor is in the viewport, then set the horizontal scrollbar to the bottom of the editor space
if (markdownEditorBottom < viewportBottom) {
Expand All @@ -355,9 +355,9 @@ export class CodeComponent extends CellView implements OnInit, OnChanges {
horizontalScrollbar.style.top = horizontalTop + 'px';
horizontalScrollbar.style.bottom = '';
}
} else {
} else if (this.cellModel.cellType !== CellTypes.Code) {
// If horizontal scrollbar is not needed then set do not show it
horizontalScrollbar.style.opacity = '0';
horizontalScrollbar.style.display = 'none';
}
}

Expand Down