Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Bug in SmartClient's core while using jQuery and Internet Explorer 10

$
0
0
Hi,

we encountered a bug in SmartClient's core while using jQuery and Internet Explorer 10.
SmartClient Version: v9.1p_2014-09-30/LGPL Deployment (built 2014-09-30)
IE v10.0.9200.16750, update version 10.0.12 under Windows 7.

The issue can be triggered by firing an event through jQuery. SmartClient's dispatch() gets called and throws a JavaScript error. Thus further code after triggering the event will not be executed anymore.

We are using this test page:
HTML Code:

<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript">
        window.isomorphicDir = '/isomorphic/';
    </script>
   
    <script type="text/javascript" src="/isomorphic/system/modules-debug/ISC_Core.js"></script>
    <script type="text/javascript" src="/isomorphic/system/modules-debug/ISC_Foundation.js"></script>
    <script type="text/javascript" src="/isomorphic/system/modules-debug/ISC_Containers.js"></script>
    <script type="text/javascript" src="/isomorphic/system/modules-debug/ISC_Grids.js"></script>
    <script type="text/javascript" src="/isomorphic/system/modules-debug/ISC_Forms.js"></script>
    <script type="text/javascript" src="/isomorphic/system/modules-debug/ISC_RichTextEditor.js"></script>
    <script type="text/javascript" src="/isomorphic/system/modules-debug/ISC_DataBinding.js"></script>
    <script type="text/javascript" src="/isomorphic/system/modules-debug/ISC_Drawing.js"></script>
    <script type="text/javascript" src="/isomorphic/skins/Enterprise/load_skin.js"></script>
    <script type="text/javascript" src="/isomorphic/locales/frameworkMessages_de.properties"></script>
   
    <script type="text/javascript" src="/inc/jquery-1.9.1.min.js"></script>
  </head>
 
  <body>
    <div>Foo</div>
   
    <script type="text/javascript">
      $(function() {
        $('div').click(function() {
          $(this).css('color', 'red');
        });
       
        $('div').click();    // trigger error in SmartClient
        $('div').text('Bar'); // will NOT be executed because of SmartClient
      });
    </script>
  </body>
</html>

IE's console shows this error:
Code:

SCRIPT5007: Die Eigenschaft "type" eines undefinierten oder Nullverweises kann nicht abgerufen werden.
ISC_Core.js, Zeile 35161 Zeichen 5

Result in IE: Text is "Foo"
Expected result: Text is "Bar"

We looked into this problem and suggest to replace
Code:

# ISC_Core.js, l. 35158
if (isc.Browser.isIE) event = this.getWindow().event;

with
Code:

if (isc.Browser.isIE) event = this.getWindow().event || event;
This will avoid overriding the actual event the method got by parameter with a null value getWindow().event returns.

Viewing all articles
Browse latest Browse all 4756

Trending Articles