RichFaces
  1. RichFaces
  2. RF-11838

Warning in Chrome console for pages with ajax

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 4.1.0.Final
    • Fix Version/s: 4.2.0.CR1
    • Component/s: compatibility
    • Security Level: Public (Everyone can see)
    • Labels:
      None
    • Environment:
      Google Chrome 16.0.912.63
    • Similar Issues:
      Show 10 results 

      Description

      1. open Showcase in Chrome http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=ajax&skin=blueSky
      2. open browser console
      3. type "xxx" into input

      result:
      The following warning is displayed in browser console 6 times (twice for each Ajax request). Seems to be Chrome-specific and seems not to influence functionality of any component.

      event.layerX and event.layerY are broken and deprecated in WebKit. They will be removed from the engine in the near future.

        Activity

        Hide
        Brian Leathem
        added a comment -

        This is an upstream problem with jQuery (issue 10531 ), and will be resolved when we upgrade to jQuery 1.7.

        Created RF-11847 to track upgrading jQuery.

        Show
        Brian Leathem
        added a comment - This is an upstream problem with jQuery ( issue 10531 ), and will be resolved when we upgrade to jQuery 1.7. Created RF-11847 to track upgrading jQuery.
        Hide
        Brian Leathem
        added a comment -

        Closing, as this will be addressed with the jQeury update. Please re-open the issue if the problem persists after jQuery is updated.

        Show
        Brian Leathem
        added a comment - Closing, as this will be addressed with the jQeury update. Please re-open the issue if the problem persists after jQuery is updated.
        Hide
        Pavol Pitonak
        added a comment -

        I see the warning in Chrome's console after jQuery upgrade (jQuery.fn.jquery returns 1.7.1).

        RichFaces 4.1.1-SNAPSHOT
        Metamer 4.1.1-SNAPSHOT
        Mojarra 2.1.5
        JBoss AS 7.1.0.CR1
        OpenJDK Runtime Environment 1.6.0_22-b22 @ Linux
        Chrome 16.0.912.75 @ Linux i686

        Show
        Pavol Pitonak
        added a comment - I see the warning in Chrome's console after jQuery upgrade (jQuery.fn.jquery returns 1.7.1). RichFaces 4.1.1-SNAPSHOT Metamer 4.1.1-SNAPSHOT Mojarra 2.1.5 JBoss AS 7.1.0.CR1 OpenJDK Runtime Environment 1.6.0_22-b22 @ Linux Chrome 16.0.912.75 @ Linux i686
        Hide
        Brian Leathem
        added a comment -

        A grep of the RichFaces codebase does not provide any immediate indication as to what is causing this. A web search indicates this can also be caused by installed chrome extensions - I disabled all my extensions, and still observed the method.

        Further investigation is required.

        Show
        Brian Leathem
        added a comment - A grep of the RichFaces codebase does not provide any immediate indication as to what is causing this. A web search indicates this can also be caused by installed chrome extensions - I disabled all my extensions, and still observed the method. Further investigation is required.
        Hide
        Brian Leathem
        added a comment -

        In richfaces-queue.js, we copy the event (otherwise IE fails) on Line 129:

        richfaces-queue.js
        this.event = $.extend({}, event);
        

        Since layerX and layerY are still properties of the Webkit event (they have not yet been removed), we are copying them in our event copy. The access to the event properties triggers the error.

        On solution is to remove the properties from the event prior to copying the event, as investigated quite thoroughly by the jsperf team:
        http://jsperf.com/removing-event-props/2

        Show
        Brian Leathem
        added a comment - In richfaces-queue.js, we copy the event (otherwise IE fails) on Line 129 : richfaces-queue.js this .event = $.extend({}, event); Since layerX and layerY are still properties of the Webkit event (they have not yet been removed), we are copying them in our event copy. The access to the event properties triggers the error. On solution is to remove the properties from the event prior to copying the event, as investigated quite thoroughly by the jsperf team: http://jsperf.com/removing-event-props/2
        Hide
        Brian Leathem
        added a comment -

        Removed the layerX and layerY events

        Show
        Brian Leathem
        added a comment - Removed the layerX and layerY events
        Hide
        Pëtr Andreev
        added a comment -

        4.2.0-SNAPSHOT Showcase->Ajax Action->a4j:ajax->Dynamic Selects:

        I think there must be one more check for event.layerX in richfaces-queue.js, line 129, otherwise the ajax req fails on IE8 (or on IE9/<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>) with "SCRIPT438: Object doesn't support this property or method
        richfaces-queue.js.jsf, line 130 character 17":

        richfaces-queue.js
                    // Remove the layerX and layerY events (generated in WebKit browsers)
                    if (event && event.layerX) {
                        delete event.layerX;
                        delete event.layerY;
                    }
        

        I`ve tested it with FF13, IE8/Win7, IE9(EmulateIE8) and Chrome- no errors

        Show
        Pëtr Andreev
        added a comment - 4.2.0-SNAPSHOT Showcase->Ajax Action->a4j:ajax->Dynamic Selects : I think there must be one more check for event.layerX in richfaces-queue.js, line 129, otherwise the ajax req fails on IE8 (or on IE9/<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>) with "SCRIPT438: Object doesn't support this property or method richfaces-queue.js.jsf, line 130 character 17": richfaces-queue.js // Remove the layerX and layerY events (generated in WebKit browsers) if (event && event.layerX) { delete event.layerX; delete event.layerY; } I`ve tested it with FF13, IE8/Win7, IE9(EmulateIE8) and Chrome- no errors
        Hide
        Alex Krasov
        added a comment -

        I second that, had to patch js files in order to be able to use 4.2 at IE9(EmulateIE8)

        Show
        Alex Krasov
        added a comment - I second that, had to patch js files in order to be able to use 4.2 at IE9(EmulateIE8)

          People

          • Assignee:
            Brian Leathem
            Reporter:
            Pavol Pitonak
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: