Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-11838

Warning in Chrome console for pages with ajax

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.1.0.Final
    • Fix Version/s: 4.2.0.CR1
    • Component/s: compatibility
    • Labels:
      None
    • Environment:

      Google Chrome 16.0.912.63

      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.

        Gliffy Diagrams

          Activity

          Hide
          bleathem 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
          bleathem 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
          bleathem 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
          bleathem 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
          ppitonak 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
          ppitonak 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
          bleathem 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
          bleathem 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
          bleathem 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
          bleathem 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
          bleathem Brian Leathem added a comment -

          Removed the layerX and layerY events

          Show
          bleathem Brian Leathem added a comment - Removed the layerX and layerY events
          Hide
          pjotrovsky 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
          pjotrovsky 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 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 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:
              bleathem Brian Leathem
              Reporter:
              ppitonak Pavol Pitonak
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development