Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    StringUTIL.asHTML is broken in FF4

    Hi there,

    There is an issue with Firefox4 betas newer than beta4, including the current b10pre:

    StringUTIL.asHTML, which is supposed to espace non-HTML-safe characters, fails.

    Here is a stack trace:

    Code:
    Error: com.google.gwt.core.client.JavaScriptException: (TypeError): (new $wnd.String(str)).asHTML is not a function
     fileName: http://127.0.0.1:8888
     lineNumber: 14
     stack: ("<br>")@http://127.0.0.1:8888:14
    ([object GWTJavaObject],1048775,[object GWTJavaObject])@http://127.0.0.1:8888/orgtel/hosted.html?orgtel:56
    ([object Object],(void 0))@http://127.0.0.1:8888:1066
    ((function () {var param = {};var event = __gwt_makeJavaInvoke(1)(null, 2687095, param);__gwt_makeJavaInvoke(1)(selfJ, 1048775, event);var ret = __gwt_makeJavaInvoke(0)(event, 1179654);return !ret;}),[object Object],[object Arguments])@http://127.0.0.1:8888:65
    (null,65642,(function () {var param = {};var event = __gwt_makeJavaInvoke(1)(null, 2687095, param);__gwt_makeJavaInvoke(1)(selfJ, 1048775, event);var ret = __gwt_makeJavaInvoke(0)(event, 1179654);return !ret;}),[object Object],[object Arguments])@http://127.0.0.1:8888/orgtel/hosted.html?orgtel:56
    ([object Object],(void 0))@http://127.0.0.1:8888:49
    ([object Object],(void 0))@http://127.0.0.1:8888:13
    isc_StatefulCanvas_handleActivate([object Object],(void 0))@http://127.0.0.1:8888/orgtel/sc/modules/ISC_Foundation.js:319
    isc_StatefulCanvas_handleClick([object Object],(void 0))@http://127.0.0.1:8888/orgtel/sc/modules/ISC_Foundation.js:321
    isc_c_EventHandler_bubbleEvent([object Object],"click")@http://127.0.0.1:8888/orgtel/sc/modules/ISC_Core.js:1553
    isc_c_EventHandler_handleClick([object Object])@http://127.0.0.1:8888/orgtel/sc/modules/ISC_Core.js:1401
    isc_c_EventHandler__handleMouseUp([object MouseEvent],(void 0))@http://127.0.0.1:8888/orgtel/sc/modules/ISC_Core.js:1388
    isc_c_EventHandler_handleMouseUp([object MouseEvent])@http://127.0.0.1:8888/orgtel/sc/modules/ISC_Core.js:1379
    isc_c_EventHandler_dispatch(isc_c_EventHandler_handleMouseUp,[object MouseEvent])@http://127.0.0.1:8888/orgtel/sc/modules/ISC_Core.js:1616
    anonymous([object MouseEvent])@http://127.0.0.1:8888/orgtel/sc/modules/ISC_Core.js:61
    
    	com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
    	com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:126)
    	com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
    	com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
    	com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    	com.smartgwt.client.util.StringUtil.asHTML(StringUtil.java)
    You can trigger this by calling the method with any param. My test is:

    Code:
    SC.say("Result is: " + StringUtil.asHTML("<br>"));
    FF4 is not yet released, so this is not yet critical, but it would be great if our apps would run with the betas.

    Other than this, I see no other obvious compatibility issues.

    (Checked with both 2.3 and 2.4 power versions, same result.)
    (Checked on both linux and windows.)

    Thank you for your help, and congrats on 2.4!

    Kristof

    #2
    FYI: moving to GWT's SafeHtmlUtils is an easy work-around for this.

    Comment


      #3
      Originally posted by csillag
      FF4 is not yet released, so this is not yet critical, but it would be great if our apps would run with the betas.
      Still reproducible with FF4 RC2 using
      SmartClient Version: SC_SNAPSHOT-2011-03-20/LGPL Development Only (built 2011-03-20)


      Cheers
      Davide

      Comment


        #4
        Originally posted by d.cavestro
        Still reproducible with FF4 RC2 using
        SmartClient Version: SC_SNAPSHOT-2011-03-20/LGPL Development Only (built 2011-03-20)


        Cheers
        Davide
        I suspect even SC.confirm() is broken for Firefox 4 (rc2 is now stable) and
        SmartClient Version: SC_SNAPSHOT-2011-03-20/LGPL Development Only (built 2011-03-20)

        Calling SC.confirm and choosing cancel invariably lead FF4 to crash... anyone experimented the same?
        Isomorphic?

        Comment


          #5
          Still broken in FF 4 final.

          Comment


            #6
            This is now resolved in our mainline code base. The change will be present in the next nightly build (April 5 2011)

            Comment

            Working...
            X