ui icon indicating copy to clipboard operation
ui copied to clipboard

JS render must be reordered

Open mvorisek opened this issue 3 years ago • 0 comments

repro code:

$modal = Modal::addTo($app);

$modal->set(function (View $p) {
    Message::addTo($p, ['test']);
});

$modal->js(true)->modal('show');

$button = Button::addTo($app)->set('Test');
$button->on('click', $modal->jsShow());

I would expect modal with message displayed, but empty modal is shown instead.

image

the problem is:

image

the show JS code must be rendered after modal is configured

notice, when modal is closed and reopened by the button, message is rendered:

image

notice also the first problem corrupts the top left/right modal rounded corners

mvorisek avatar Oct 26 '22 14:10 mvorisek