Popup contents disappears when delay enabled

Created on 16 March 2019, over 5 years ago
Updated 5 March 2024, 4 months ago

Configured a popup based on a block, with layout Bottom Right, no overlay, trigger=Automatic and 5s delay.

After 5 seconds the popup appears, but the contents are missing. All you see is a thin horizontal line because only the frame is being rendered, not the form that was configured in the region.

Looking at the code, it's because of this in simple_popup_blocks.js:

// Automatic trigger with delay
if (values.trigger_method == 0 && values.delay > 0) {
delays = values.delay * 1000
$('.' + modal_class).delay(delays).fadeIn('slow')
if (values.overlay == 1) {
setTimeout(stopTheScroll, delays)
}
}

The "fadeIn" line is only acting on the outer class and misses out the contents.
Adding the following line fixes the problem:

// Automatic trigger with delay
if (values.trigger_method == 0 && values.delay > 0) {
delays = values.delay * 1000
$('.' + modal_class).delay(delays).fadeIn('slow')
$(css_identity + block_id).delay(delays).fadeIn('slow') // Added
if (values.overlay == 1) {
setTimeout(stopTheScroll, delays)
}
}

The patched js file is attached.

Let me know if you need any further information.

πŸ› Bug report
Status

Fixed

Version

1.2

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom opsdemon

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024