MyFaces Tomahawk
  1. MyFaces Tomahawk
  2. TOMAHAWK-796

inputCalendar doesn't work under Opera 9 when renderAsPopup is 'true'

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.1.3, 1.1.5-SNAPSHOT
    • Fix Version/s: None
    • Component/s: Calendar
    • Labels:
      None
    • Environment:
      Windows, Opera 9.02 (also 9.01), Sun Java Runtime Environment version 1.4

      Description

      after click on calendar image we have errors in Opera error console:

      Event thread: click
      Error:
      Unhandled exception: [Object DOMException]
      code: 5
      message: INVALID_CHARACTER_ERR
      Backtrace:
      Line 124 of linked script http://localhost:8080/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11642727/calendar.HtmlCalendarRenderer/popcalendar.js;jsessionid=9B5EA2BE7C36884AD86ABDEC32B2A84E
      iframe = document.createElement("<iframe id='" + overDiv.id + "_IFRAME' style='visibility:hidden; position: absolute; top:0px;left:0px;'/>");
      Line 1393 of linked script http://localhost:8080/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11642727/calendar.HtmlCalendarRenderer/popcalendar.js;jsessionid=9B5EA2BE7C36884AD86ABDEC32B2A84E
      this._hideElement(this.calendarDiv);
      Line 1282 of linked script http://localhost:8080/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11642727/calendar.HtmlCalendarRenderer/popcalendar.js;jsessionid=9B5EA2BE7C36884AD86ABDEC32B2A84E
      this._popUpCalendar_Show(ctl);
      Line 1 of script
      form_3AbeginDateCalendarVar._popUpCalendar(this, document.getElementById("form:beginDate"), "dd.MM.yyyy");
      At unknown location
      [statement source code not available]

      Timeout thread: delay 200 ms
      Error:
      Unhandled exception: [Object DOMException]
      code: 5
      message: INVALID_CHARACTER_ERR
      Backtrace:
      Line 124 of linked script http://localhost:8080/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11642727/calendar.HtmlCalendarRenderer/popcalendar.js;jsessionid=9B5EA2BE7C36884AD86ABDEC32B2A84E
      iframe = document.createElement("<iframe id='" + overDiv.id + "_IFRAME' style='visibility:hidden; position: absolute; top:0px;left:0px;'/>");
      Line 1390 of linked script http://localhost:8080/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11642727/calendar.HtmlCalendarRenderer/popcalendar.js;jsessionid=9B5EA2BE7C36884AD86ABDEC32B2A84E
      this._hideElement(this.calendarDiv);
      Line 52 of linked script http://localhost:8080/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11642727/prototype.PrototypeResourceLoader/prototype.js;jsessionid=9B5EA2BE7C36884AD86ABDEC32B2A84E
      return __method.apply(object, args.concat($A(arguments)));
      At unknown location
      [statement source code not available]

      you can try http://example.irian.at/example-simple-20061123/calendar.jsf (MyFaces Tomahawk Examples latest build) to see it.


      Best regards, Sergey

      1. popcalendar.js
        52 kB
        paul reeves

        Activity

        Hide
        Hermod Opstvedt added a comment -

        Works for me on Opera 9.0.2. The only errors I get are som css errors (CSS - http://example.irian.at/example-simple-20061123/css/basic.css)

        Hermod

        Show
        Hermod Opstvedt added a comment - Works for me on Opera 9.0.2. The only errors I get are som css errors (CSS - http://example.irian.at/example-simple-20061123/css/basic.css ) Hermod
        Hide
        Safronov Sergey added a comment -

        I don't think that it is helpful but here my 'About Opera' data:

        Version information

        • Version 9.02
        • Build 8585
        • Platform Win32
        • System Windows NT 5.2
        • Java Sun Java Runtime Environment version 1.4
        • XHTML+Voice Plug-in not loaded

        Browser identification

        • Opera/9.02 (Windows NT 5.2; U; en)

        when I post a link to irian website I mean that problem is in lower section 'Calendar as a JavaScript popup.'.
        errors occurs when I click on button with label '...' on the right of text field.
        bug is recurs.


        Best regards, Sergey

        Show
        Safronov Sergey added a comment - I don't think that it is helpful but here my 'About Opera' data: Version information Version 9.02 Build 8585 Platform Win32 System Windows NT 5.2 Java Sun Java Runtime Environment version 1.4 XHTML+Voice Plug-in not loaded Browser identification Opera/9.02 (Windows NT 5.2; U; en) when I post a link to irian website I mean that problem is in lower section 'Calendar as a JavaScript popup.'. errors occurs when I click on button with label '...' on the right of text field. bug is recurs. – Best regards, Sergey
        Hide
        Hermod Opstvedt added a comment -

        Hi

        Ok, that explains why I was not able to reproduce it. I can confirm that I also get that error when clicking on the "..." button.

        Hermod

        Show
        Hermod Opstvedt added a comment - Hi Ok, that explains why I was not able to reproduce it. I can confirm that I also get that error when clicking on the "..." button. Hermod
        Hide
        Safronov Sergey added a comment -

        I want to note: there is no such bug in tomahawk 1.1.1!


        Best regards, Sergey

        Show
        Safronov Sergey added a comment - I want to note: there is no such bug in tomahawk 1.1.1! – Best regards, Sergey
        Hide
        Safurudin Mahic added a comment -

        A little compability matrix

        Tomahawk 1.1.1 + Opera 8.5x works
        Tomahawk 1.15 + Opera 8.5x works
        Tomahawk 1.1.1 + Opera 9x works
        Tomahawk 1.1.5 + Opera 9x breaks

        The old version of opera works with the new tomahawk, which is very strange.

        Does anyone have a patch for this yet? This bug not being resolved gives us no choice to upgrade to newer versions of tomahawk if we want to support opera.

        Show
        Safurudin Mahic added a comment - A little compability matrix Tomahawk 1.1.1 + Opera 8.5x works Tomahawk 1.15 + Opera 8.5x works Tomahawk 1.1.1 + Opera 9x works Tomahawk 1.1.5 + Opera 9x breaks The old version of opera works with the new tomahawk, which is very strange. Does anyone have a patch for this yet? This bug not being resolved gives us no choice to upgrade to newer versions of tomahawk if we want to support opera.
        Hide
        paul reeves added a comment -

        I think i've succesfully patched this. The issue was indeed with the iframe. opera 9 doesn't like xml strings in document.createElement.

        However, opera doesn't need an iframe (its only used i believe for IE (versions below 7) as I.E has problems with drop downs appearing through div's).

        Opera tries to render the iframe as it doesn't "silently" detect the document.all object, therefore, I needed to modify a few tests for document.all to become document.all && !window.opera

        There is also another issue with opera not rendering the calendar in the right place. This is to do with a scroll offset bug see http://dev.fckeditor.net/ticket/8 (which apparently will be fixed in opera 9.5) My patch also incorporates a bit of code from http://dev.rubyonrails.org/ticket/7466 to fix it.

        The code is only invoked if (window.opera && parseInt(window.opera.version()) < 9.5).

        I cannot verify that opera 9.5 will fix it however.

        I'm new to submitting patches here, do i just need to attach the file to this issue?

        If so i'll clean up my code and submit it when i hear back from someone.

        Cheers

        Show
        paul reeves added a comment - I think i've succesfully patched this. The issue was indeed with the iframe. opera 9 doesn't like xml strings in document.createElement. However, opera doesn't need an iframe (its only used i believe for IE (versions below 7) as I.E has problems with drop downs appearing through div's). Opera tries to render the iframe as it doesn't "silently" detect the document.all object, therefore, I needed to modify a few tests for document.all to become document.all && !window.opera There is also another issue with opera not rendering the calendar in the right place. This is to do with a scroll offset bug see http://dev.fckeditor.net/ticket/8 (which apparently will be fixed in opera 9.5) My patch also incorporates a bit of code from http://dev.rubyonrails.org/ticket/7466 to fix it. The code is only invoked if (window.opera && parseInt(window.opera.version()) < 9.5). I cannot verify that opera 9.5 will fix it however. I'm new to submitting patches here, do i just need to attach the file to this issue? If so i'll clean up my code and submit it when i hear back from someone. Cheers
        Hide
        Kristian Aaslund added a comment -

        Will the patch be submitted soon?
        I have performed the changes you suggested to make Opera render the inputCalendar, but I can't figure out the offset problem.
        Please post the code to fix this, as the example from rubyonrails.org didn't work.

        Does anyone know if this will be fixed in the 1.1.7 release?

        Show
        Kristian Aaslund added a comment - Will the patch be submitted soon? I have performed the changes you suggested to make Opera render the inputCalendar, but I can't figure out the offset problem. Please post the code to fix this, as the example from rubyonrails.org didn't work. Does anyone know if this will be fixed in the 1.1.7 release?
        Hide
        Cezary Butler added a comment -

        I don't think Tomahawk 1.1.1works with new versions of Opera.

        On the Opera 9.24 with Tomahawk 1.1.1 when I click ... button, I get:
        JavaScript - http://localhost:8080/WebApplication2/faces/welcomeJSF.jsp
        Event thread: click
        Error:
        Unhandled exception: [Object DOMException]
        code: 5
        message: INVALID_CHARACTER_ERR
        Backtrace:
        Line 125 of linked script http://localhost:8080/WebApplication2/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11979869/calendar.HtmlCalendarRenderer/popcalendar.js
        iframe = document.createElement("<iframe src='javascript:false;' id='" + overDiv.id + "_IFRAME' style='visibility:hidden; position: absolute; top:0px;left:0px;'/>");
        Line 1405 of linked script http://localhost:8080/WebApplication2/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11979869/calendar.HtmlCalendarRenderer/popcalendar.js
        this._hideElement(this.calendarDiv);
        Line 1283 of linked script http://localhost:8080/WebApplication2/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11979869/calendar.HtmlCalendarRenderer/popcalendar.js
        this._popUpCalendar_Show(ctl);
        Line 1 of script
        _5FidJsp0_3A_5FidJsp1CalendarVar._popUpCalendar(this, document.getElementById("_idJsp0:_idJsp1"), "dd MMMM yyyy");
        At unknown location
        [statement source code not available]
        JavaScript - http://localhost:8080/WebApplication2/faces/welcomeJSF.jsp
        Timeout thread: delay 200 ms
        Error:
        Unhandled exception: [Object DOMException]
        code: 5
        message: INVALID_CHARACTER_ERR
        Backtrace:
        Line 125 of linked script http://localhost:8080/WebApplication2/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11979869/calendar.HtmlCalendarRenderer/popcalendar.js
        iframe = document.createElement("<iframe src='javascript:false;' id='" + overDiv.id + "_IFRAME' style='visibility:hidden; position: absolute; top:0px;left:0px;'/>");
        Line 1402 of linked script http://localhost:8080/WebApplication2/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11979869/calendar.HtmlCalendarRenderer/popcalendar.js
        this._hideElement(this.calendarDiv);
        Line 52 of linked script http://localhost:8080/WebApplication2/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11979869/prototype.PrototypeResourceLoader/prototype.js
        return __method.apply(object, args.concat($A(arguments)));
        At unknown location
        [statement source code not available]

        I really need patch for this one.

        Show
        Cezary Butler added a comment - I don't think Tomahawk 1.1.1works with new versions of Opera. On the Opera 9.24 with Tomahawk 1.1.1 when I click ... button, I get: JavaScript - http://localhost:8080/WebApplication2/faces/welcomeJSF.jsp Event thread: click Error: Unhandled exception: [Object DOMException] code: 5 message: INVALID_CHARACTER_ERR Backtrace: Line 125 of linked script http://localhost:8080/WebApplication2/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11979869/calendar.HtmlCalendarRenderer/popcalendar.js iframe = document.createElement("<iframe src='javascript:false;' id='" + overDiv.id + "_IFRAME' style='visibility:hidden; position: absolute; top:0px;left:0px;'/>"); Line 1405 of linked script http://localhost:8080/WebApplication2/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11979869/calendar.HtmlCalendarRenderer/popcalendar.js this._hideElement(this.calendarDiv); Line 1283 of linked script http://localhost:8080/WebApplication2/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11979869/calendar.HtmlCalendarRenderer/popcalendar.js this._popUpCalendar_Show(ctl); Line 1 of script _5FidJsp0_3A_5FidJsp1CalendarVar._popUpCalendar(this, document.getElementById("_idJsp0:_idJsp1"), "dd MMMM yyyy"); At unknown location [statement source code not available] JavaScript - http://localhost:8080/WebApplication2/faces/welcomeJSF.jsp Timeout thread: delay 200 ms Error: Unhandled exception: [Object DOMException] code: 5 message: INVALID_CHARACTER_ERR Backtrace: Line 125 of linked script http://localhost:8080/WebApplication2/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11979869/calendar.HtmlCalendarRenderer/popcalendar.js iframe = document.createElement("<iframe src='javascript:false;' id='" + overDiv.id + "_IFRAME' style='visibility:hidden; position: absolute; top:0px;left:0px;'/>"); Line 1402 of linked script http://localhost:8080/WebApplication2/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11979869/calendar.HtmlCalendarRenderer/popcalendar.js this._hideElement(this.calendarDiv); Line 52 of linked script http://localhost:8080/WebApplication2/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11979869/prototype.PrototypeResourceLoader/prototype.js return __method.apply(object, args.concat($A(arguments))); At unknown location [statement source code not available] I really need patch for this one.
        Hide
        Simon Kitching added a comment -

        For some reason this issue was marked as "patch available", but I can't see one so I've reset that.

        Cezary, there certainly will not be a patch for tomahawk-1.1.1 released. That is very old.
        If you can provide a patch for 1.1.7 I will try to find time to test and commit it.

        Show
        Simon Kitching added a comment - For some reason this issue was marked as "patch available", but I can't see one so I've reset that. Cezary, there certainly will not be a patch for tomahawk-1.1.1 released. That is very old. If you can provide a patch for 1.1.7 I will try to find time to test and commit it.
        Hide
        Simon Kitching added a comment -

        Ok, the javascript error is now fixed for Opera 9.x. As noted by Paul Reeves, Opera does not allow the parameter to document.createElement to contain html; instead it must contain just the name of the dom element type desired. Actually, allowing anything else is weird, so as usual Opera is right and IE is wrong.

        I haven't fixed the positioning problem with the popup calendar on Opera 9.; it currently appears in the top-left of the window rather than relative to the button that triggers it. Paul, if you can submit a patch containing the fix you found, I'll test and apply it. Otherwise I'll try to get around to using the info from the rails link provided. I'm not an Opera user, however, so it isn't high priority for me.

        I have tested just with Opera 9.25; if someone could test with Opera 8.x that would be nice.

        Show
        Simon Kitching added a comment - Ok, the javascript error is now fixed for Opera 9.x. As noted by Paul Reeves, Opera does not allow the parameter to document.createElement to contain html; instead it must contain just the name of the dom element type desired. Actually, allowing anything else is weird, so as usual Opera is right and IE is wrong. I haven't fixed the positioning problem with the popup calendar on Opera 9.; it currently appears in the top-left of the window rather than relative to the button that triggers it. Paul, if you can submit a patch containing the fix you found, I'll test and apply it. Otherwise I'll try to get around to using the info from the rails link provided. I'm not an Opera user, however, so it isn't high priority for me. I have tested just with Opera 9.25; if someone could test with Opera 8.x that would be nice.
        Hide
        paul reeves added a comment -

        This file provides support for opera versions below 9.5 It has been tested on Opera 9,25, 9.10 and 8.00

        There is a slight positioning issue in this browser due to a bug (this is fixed in 9.5) however, this patch makes the calendar component usable.

        Show
        paul reeves added a comment - This file provides support for opera versions below 9.5 It has been tested on Opera 9,25, 9.10 and 8.00 There is a slight positioning issue in this browser due to a bug (this is fixed in 9.5) however, this patch makes the calendar component usable.
        Hide
        Werner Punz added a comment -

        Actually opera 9.5 still has some positioning bugs, I was working on the positioning code today, and
        one of my testcases for the new positioning code was three divs nested with scrollers, some positioning
        and a table in between doing another few layouts.

        All browsers rendered fine without any browser specific fork:
        ie6 and 7, Mozilla 2, Safari 3 aka webkit, only opera again did a mispositioning,
        I will setup a public site somewhere next week and will give opera a bugreport!

        Show
        Werner Punz added a comment - Actually opera 9.5 still has some positioning bugs, I was working on the positioning code today, and one of my testcases for the new positioning code was three divs nested with scrollers, some positioning and a table in between doing another few layouts. All browsers rendered fine without any browser specific fork: ie6 and 7, Mozilla 2, Safari 3 aka webkit, only opera again did a mispositioning, I will setup a public site somewhere next week and will give opera a bugreport!

          People

          • Assignee:
            Unassigned
            Reporter:
            Safronov Sergey
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Development