Working on bug fix for viewing the IDAA Recovery Meeting list after viewing a Meeting.
This commit is contained in:
@@ -82,6 +82,23 @@ window.addEventListener('message', function(event) {
|
||||
idaa_ae_iframe_element.style.height = `${idaa_ae_iframe_height+50}px`;
|
||||
}
|
||||
|
||||
if (event.data.scroll_to !== undefined) {
|
||||
console.log(`Got scroll_to: ${event.data.scroll_to}`);
|
||||
|
||||
let idaa_ae_iframe_element = document.getElementById('ae_idaa_bb_iframe');
|
||||
if (idaa_ae_iframe_element) {
|
||||
console.log(`Scrolling to: ${event.data.scroll_to}`);
|
||||
// window.scrollTo(0, 0); // This works for all current browsers
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
left: 0,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
} else {
|
||||
console.warn(`Element with ID "ae_idaa_bb_iframe" not found.`);
|
||||
}
|
||||
}
|
||||
|
||||
const url = new URL(location);
|
||||
|
||||
// Check if post_id is defined in the message
|
||||
|
||||
Reference in New Issue
Block a user