Author Topic: Uncaught TypeError when clicking on cell using render/postRender with html/svg  (Read 2961 times)

easyKost

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 5
    • View Profile
Hello

In the 2.4.1 version we were using render with  svg/html content. In the version 3.3.0, we have error when clicking on cell
Here is an example of render we are using:

columnrender=function(ui) {
  var ret = '<svg height="10" width="10" >';
  ret+='<circle cx="5" cy="5" r="3"  stroke-width="1" ></circle></svg>>';
  return ret
}

Same error can be reproduce on the 3.3.0 demo "Charts => Inline charts": When you click on a cell with a chart you have the following trace:

Uncaught TypeError: c.originalEvent.target.className.indexOf is not a function: pqgrid.min.js:390
f._onRowMouseDown      @ pqgrid.min.js:390
(anonymous function)     @ pqgrid.min.js:387
a                                  @ pqgrid.min.js:10
p._trigger                      @ pqgrid.min.js:11
c._onRowMouseDown      @ pqgrid.min.js:126
(anonymous function)      @ pqgrid.min.js:86
dispatch                         @ jquery.min.js:2
u                                   @ jquery.min.js:2

Thanks for your support,
Best Regards,
easyKost.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Thanks for reporting the issue. Please use the included patch 3.3.1.1.min.js as a fix for this issue.

It can be included after pqgrid.min.js file.

Update:

Please use the latest attachment, it also takes care of removing/adding selections upon Ctrl-click as mentioned in this post:
http://paramquery.com/forum/index.php?topic=1619.0
« Last Edit: July 13, 2016, 07:12:28 pm by paramquery »