|
@@ -665,13 +665,10 @@
|
|
|
}
|
|
|
$('.sp-location-list').on('shown.bs.modal', function () {
|
|
|
const scrollBox = $(this).find('div[class="col-8 modal-height-500"]');
|
|
|
- // const scrollBox = $(this).find('div[id="end-target"]');
|
|
|
- console.log('scrollBox', scrollBox)
|
|
|
const bdiv = (scrollBox.offset() && scrollBox.offset().top) || 0;
|
|
|
scrollBox.scrollTop(0);
|
|
|
const hdiv = divSearch($(this).find('textarea')) ? $(this).find('textarea') : null;
|
|
|
const hdheight = hdiv ? hdiv.parents('.timeline-item-content').offset().top : null;
|
|
|
- console.log(bdiv, hdheight);
|
|
|
if (hdiv && scrollBox.length && scrollBox[0].scrollHeight > 390 && hdheight - bdiv > 390) {
|
|
|
scrollBox.scrollTop(hdheight - bdiv);
|
|
|
}
|