You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "David Rain (JIRA)" <ji...@apache.org> on 2012/08/14 13:26:37 UTC

[jira] [Commented] (WICKET-4708) AJAX component replace: NoModificationAllowedError in IE 10 (Windows 8)

    [ https://issues.apache.org/jira/browse/WICKET-4708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434055#comment-13434055 ] 

David Rain commented on WICKET-4708:
------------------------------------

I experimented a bit and found out that it is sufficent to switch order of lines. That means call XXX.outerHTML = "" *before* someParent.removeChild. Because in this order the XXX element still has parent and IE 10 will permit such a call. removeChild removes the XXX from hierarchy and thus any subsequent call to outerHTML will fail because it has no longer any parent.
                
> AJAX component replace: NoModificationAllowedError in IE 10 (Windows 8)
> -----------------------------------------------------------------------
>
>                 Key: WICKET-4708
>                 URL: https://issues.apache.org/jira/browse/WICKET-4708
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.5, 1.5.7
>         Environment: Windows 7 64-bit as VMware Play host
> VMware image with Windows 8 Release Preview build 8400
> Internet Explorer 10 (desktop version, not Metro)
> JRE 1.7.0_05
>            Reporter: David Rain
>
> Function Wicket.replaceOuterHtmlIE fails in IE 10 beacause of NoModificationAllowedError. That is fired because of attempt to modify outerHTML of elements which parent is in turn set to null. IE 10 doesn't allow setting outerHTML of elements which parent is null. This was confirmed to us by Microsoft. Bad is that it isn't just an issue of the preview version. It isn't considered as a bug by Microsoft. So this comment https://issues.apache.org/jira/browse/WICKET-1186?focusedCommentId=13400468&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13400468 does not solve the problem. MS won't fix anything. And I can't imagine moving to (nowadays beta) Wicket 6 and re-testing whole application.
> Problem is around line 289 a 298 of wicket-ajax.js. When these lines fail, the Wicket.Head.addJavascripts cycle is skipped then and pages work weird then.
> I think that setting local references to null and outerHTMLs to "" isn't needed. The elements were removed from DOM by removeChild so there is no need to null local variables at all. But at least that should be wrapped in try/catch or placed at the very end of the method so that failure doesn't influence the rest of the code.
> And I found another possible mistake at line 298 - the tempDiv.outerHTML = ""; should be in the if block together with document.body.removeChild(tempDiv); I think.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira