You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2014/07/07 17:46:34 UTC

[jira] [Commented] (WICKET-5608) Calendar (DataPicker) javascript error in modal window under IE 8

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

Martin Grigorov commented on WICKET-5608:
-----------------------------------------

I've spent a lot of time on this and I cannot find out what is the problem.
There are many complains in Internet about IE8 and innerHTML.
I have the feeling that it fails because the produced HTML is invalid - org.apache.wicket.extensions.yui.calendar.DatePicker#afterRender() writes some <span> elements (an inline element!) and later line 3336 tries to set a <table> as innerHTML. I've changed it to <div> instead and now the HTML is valid but IE8 still fails ...
The only way I made it work is by removing all children of the <div>, then create a dummy child and finally use jQuery.replaceWith() to replace the dummy with the generated HTML. I guess jQuery sanitizes it somehow. But this fix is really ugly - it introduces jQuery in this YUI2 based component ...

I'd recommend you to use any jQuery based datepicker. Wicket-Bootstrap and Wicket-JQuery-UI projects provide such.

> Calendar (DataPicker) javascript error in modal window under IE 8
> -----------------------------------------------------------------
>
>                 Key: WICKET-5608
>                 URL: https://issues.apache.org/jira/browse/WICKET-5608
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.9.1, 6.15.0
>            Reporter: Lech S.
>         Attachments: calerr.7z
>
>
> When:
> * modal window was created using modal.setContent()
> * containing calendar 
> * calendar (datePicker) component is clicked under IE 8
> Then Javascript error is being thrown:
> {code}
> Webpage error details
> User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)
> Timestamp: Wed, 4 Jun 2014 15:17:47 UTC
> Message: Unknown runtime error
> Line: 3336
> Char: 9
> Code: 0
> URI: http://localhost:8080/calerr/wicket/resource/org.apache.wicket.extensions.yui.YuiLib/calendar/calendar.js
> {code}
> This bug exist since Wicket 6.9.1 (6.15.0 still present)



--
This message was sent by Atlassian JIRA
(v6.2#6252)