Create a spaceholder when resizing iframes.
parent
fba8badf1a
commit
59bb32fa44
|
@ -46,6 +46,11 @@
|
||||||
*/
|
*/
|
||||||
actionHandlers.prepareResize = function (iframe, data, respond) {
|
actionHandlers.prepareResize = function (iframe, data, respond) {
|
||||||
responseData = {};
|
responseData = {};
|
||||||
|
|
||||||
|
// Create spaceholder and insert after iframe.
|
||||||
|
var spaceholder = document.createElement('div');
|
||||||
|
spaceholder.style.height = (iframe.clientHeight - 1) + 'px';
|
||||||
|
iframe.parentNode.insertBefore(spaceholder, iframe.nextSibling);
|
||||||
|
|
||||||
// Reset iframe height, in case content has shrinked.
|
// Reset iframe height, in case content has shrinked.
|
||||||
iframe.style.height = '1px';
|
iframe.style.height = '1px';
|
||||||
|
@ -64,6 +69,7 @@
|
||||||
actionHandlers.resize = function (iframe, data, respond) {
|
actionHandlers.resize = function (iframe, data, respond) {
|
||||||
// Resize iframe so all content is visible.
|
// Resize iframe so all content is visible.
|
||||||
iframe.style.height = data.height + 'px';
|
iframe.style.height = data.height + 'px';
|
||||||
|
iframe.nextSibling.remove();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue