Bug fix for scroll to end.
This commit is contained in:
@@ -307,6 +307,35 @@ function scroll_container() {
|
||||
Scroll to Top
|
||||
</button>
|
||||
|
||||
<!-- Scroll to the right button -->
|
||||
<button
|
||||
type="button"
|
||||
class="
|
||||
ae_btn_success_outlined
|
||||
|
||||
btn btn-sm btn-secondary
|
||||
preset-tonal-surface
|
||||
|
||||
transition-all duration-500
|
||||
"
|
||||
|
||||
class:ae_btn_warning_filled={xLeft + xWidth < xScroll - 750}
|
||||
onclick={() => {
|
||||
document.getElementById('ae_main_content')?.scrollTo({
|
||||
left: 0,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
|
||||
window.parent.postMessage({'scroll_to': scroll_x}, "*");
|
||||
}}
|
||||
title="Scroll to right"
|
||||
>
|
||||
<span class="fas fa-arrow-right"></span>
|
||||
<!-- Scroll to Right
|
||||
xLeft={xLeft} xScroll={xScroll} xWidth={xWidth} scroll_x={scroll_x} scrollLeft={scroll_container().scrollLeft}
|
||||
total={xLeft + xWidth} -->
|
||||
</button>
|
||||
|
||||
<!-- Scroll to bottom button -->
|
||||
<button
|
||||
type="button"
|
||||
@@ -334,7 +363,7 @@ function scroll_container() {
|
||||
|
||||
console.log('Not Safari, using smooth scroll to bottom');
|
||||
document.getElementById('ae_main_content')?.scrollTo({
|
||||
top: scroll_y,
|
||||
top: yScroll,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
|
||||
@@ -344,6 +373,7 @@ function scroll_container() {
|
||||
>
|
||||
<span class="fas fa-arrow-down"></span>
|
||||
Scroll to Bottom
|
||||
<!-- yTop={yTop} yScroll={yScroll} yHeight={yHeight} scroll_y={scroll_y} scrollTop={scroll_container().scrollTop} total={scroll_container().scrollTop + yHeight} -->
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user