Working on bug fix for viewing the IDAA Recovery Meeting list after viewing a Meeting.
This commit is contained in:
@@ -34,14 +34,14 @@ import Comp__event_obj_li from './ae_idaa_comp__event_obj_li.svelte';
|
||||
// import Comp__event_obj_id_view from './ae_idaa_comp__event_obj_id_view.svelte';
|
||||
|
||||
|
||||
// let event_id = page.url.searchParams.get('event_id') ?? null;
|
||||
// if (!event_id) {
|
||||
// $idaa_slct.event_id = null;
|
||||
// } else {
|
||||
// console.log(`ae Recovery Meetings - [event_id] +page.ts: event_id = `, event_id);
|
||||
// $idaa_slct.event_id = event_id;
|
||||
// $idaa_trig.event_id = event_id;
|
||||
// }
|
||||
let event_id = page.url.searchParams.get('event_id') ?? null;
|
||||
if (!event_id) {
|
||||
$idaa_slct.event_id = null;
|
||||
} else {
|
||||
console.log(`ae Recovery Meetings - [event_id] +page.ts: event_id = `, event_id);
|
||||
$idaa_slct.event_id = event_id;
|
||||
$idaa_trig.event_id = event_id;
|
||||
}
|
||||
|
||||
let event_id_random_li: Array<string> = $state();
|
||||
|
||||
|
||||
@@ -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