Skip to content

Commit 43686e2

Browse files
authored
Merge pull request #2214 from yinglejia/modal
fix(modal): fix rounding issue in shouldShowScrollbar
2 parents 45eb170 + 6e99cee commit 43686e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/modal/modal.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export class Modal implements AfterViewInit, OnChanges {
218218
const modalContent = this.modal ? this.modal.nativeElement.querySelector(".bx--modal-content") : null;
219219
if (modalContent) {
220220
// get rounded value from height to match integer returned from scrollHeight
221-
const modalContentHeight = Math.round(modalContent.getBoundingClientRect().height);
221+
const modalContentHeight = Math.ceil(modalContent.getBoundingClientRect().height);
222222
const modalContentScrollHeight = modalContent.scrollHeight;
223223
return modalContentScrollHeight > modalContentHeight;
224224
} else {

0 commit comments

Comments
 (0)