mirror of
https://github.com/processwire/processwire.git
synced 2025-08-10 16:54:44 +02:00
Fix jQuery 3.x issue where modal dialog buttons weren't displaying when launched from asmSelect edit links
This commit is contained in:
@@ -938,6 +938,11 @@
|
|||||||
var $iframe = pwModalWindow(href, {}, 'medium');
|
var $iframe = pwModalWindow(href, {}, 'medium');
|
||||||
|
|
||||||
$iframe.on('load', function() {
|
$iframe.on('load', function() {
|
||||||
|
// slight delay is necessary in jQuery 3.x, otherwise visible buttons found to be not visible
|
||||||
|
setTimeout(function() { iframeLoaded(); }, 100);
|
||||||
|
});
|
||||||
|
|
||||||
|
var iframeLoaded = function() {
|
||||||
|
|
||||||
var $icontents = $iframe.contents();
|
var $icontents = $iframe.contents();
|
||||||
var buttons = [];
|
var buttons = [];
|
||||||
@@ -989,7 +994,8 @@
|
|||||||
$button.hide();
|
$button.hide();
|
||||||
});
|
});
|
||||||
$iframe.setButtons(buttons);
|
$iframe.setButtons(buttons);
|
||||||
});
|
};
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user