rem: var txt = document.getElementById(check_id); return !!txt && kupu.getHTMLBody() != initialBody; 
add: for (var n = textarea; n; n = n.parentNode) { if (n===document) { return kupu.getHTMLBody() != initialBody; } } return false; /* textarea is no longer in the document */ 
context:         beforeunloadTool.addHandler(function() {            var txt = document.getElementById(check_id);            return !!txt && kupu.getHTMLBody() != initialBody;        });
meta: 2380	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/2380/062cfbca02ed554f8d4d607d13fb821516218ee1/kupuploneinit.js/clean/kupu/plone/kupu_plone_layer/kupuploneinit.js