Remove element from DOM the correct way.
parent
28f8a8dc8a
commit
b3dea65fd8
|
@ -46,7 +46,7 @@
|
||||||
*/
|
*/
|
||||||
actionHandlers.prepareResize = function (iframe, data, respond) {
|
actionHandlers.prepareResize = function (iframe, data, respond) {
|
||||||
responseData = {};
|
responseData = {};
|
||||||
|
|
||||||
// Create spaceholder and insert after iframe.
|
// Create spaceholder and insert after iframe.
|
||||||
var spaceholder = document.createElement('div');
|
var spaceholder = document.createElement('div');
|
||||||
spaceholder.style.height = (iframe.clientHeight - 1) + 'px';
|
spaceholder.style.height = (iframe.clientHeight - 1) + 'px';
|
||||||
|
@ -69,7 +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();
|
iframe.parentNode.removeChild(iframe.nextSibling);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue