issue with Firefox and Flash

issue with Firefox and Flash

defdef Posts: 6Questions: 0Answers: 0
edited December 2011 in TableTools
Hi.

I have the strange issue while using TableTools 2.0.1 with Flash10-11 and Firefox 7-8 (may be all 3+ versions, dunno)
I use zeroclipboard.js 1.0.4 from the tabletools package.

i attach three buttons to my table bar, exact: copy, xls, pdf
whole plugin's config below

"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "copy_cvs_xls_pdf.swf",
"aButtons": [
{
"sExtends": "copy",
"fnComplete": null,
"sFieldSeperator": "\t", //default
"sToolTip": "Save to clipboard"
},
{
"sExtends": "pdf",
"sToolTip": "Save as PDF"
},
{
"sExtends": "xls",
"sToolTip": "Save as CSV"
}

]
}

the table div wrapper sometimes hides and then coming back by user triggered actions with following fnResizeButtons() (just to be sure that things will be OK after redraw).

So, the problem is that last button gets fail about 1 of 20 times of hide/show div period. First and second buttons are working OK, third button has flash overlay loaded but nothing happens at click. Moreover, if something was copied to clipboard by copy button, and i will click on freezed third button, clipboard will be lost and "blank" text will be in it (initially empty clipboard has nothing at all).

Workaround is to manually redraw the wrapper div again.

What is it? :/

Replies

  • defdef Posts: 6Questions: 0Answers: 0
    forgot: opera, ie, chrome have no issues. Also i was used original latest zeroclipboard 1.0.7 with a some buttons (not in table, but in other hiding/showing div too) and there was no problems even with firefox.
  • defdef Posts: 6Questions: 0Answers: 0
    edited December 2011
    after hour playing with div i have one more workaround - just show wrapper div as fast as you can (it was about half second to slide div from hidden area), now the div shows up ~5times faster and flash buttons are feeling much better. i tried to hide/show div in the cycle and could not catch the issue.
    Just for experiment i tried to show the div in ~4 times slower then half second, and buttons ware tottaly broken, whole flash sometimes freezes, or all buttons didnt work and so...

    but still the question what causes the button freeze if wrapper shows slowly? why only one button? why clipboard filled with "blank"?
  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    It sounds like the Flash button hasn't been sized to match the underlying button. TableTools provides two API methods to help with this: fnResizeButtons and fnResizeRequired ( http://datatables.net/extras/tabletools/api ).

    Allan
  • defdef Posts: 6Questions: 0Answers: 0
    edited December 2011
    as i said:
    the table div wrapper sometimes hides and then coming back by user triggered actions with following fnResizeButtons() (just to be sure that things will be OK after redraw).

    i also said:
    third button has flash overlay loaded but nothing happens at click.


    and all button sized OK but one, say two buttons work and last one doesnt.

    PS: after i set faster div show 2 days with no problems, but i want to know details to avoid the issue with some animation
  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    Can you give me a link to the page please?

    Thanks,
    Allan
  • defdef Posts: 6Questions: 0Answers: 0
    allan, i cant, its private customer vpn portal :(

    i will try to answer any your question if you need.

    what we have:
    -i have seen it only in FF
    -only one button was broken every time
    -my wrapper div, which contains button wrapper div, has time to show ~half second (if less issue not seen, if more issue appears much more often and not only one button brokes)
    -that div slides to show/hide by some trigger
    -its seems that overlay is loaded correct (anyway right mouse click is showing flash menu, and debugger shows correct overlay sizes)
    -fnResizeButtons is always called afterwards, no matter of fnResizeRequired
    -when one of buttons brokes, then if you copy something to clipboard by copy button and then click to broken button, say pdf, clipboard content will be "blank" string only, not even " "

    html code:





    js code:
    tableobj = $("#table").dataTable({
    "bRetrieve": true,
    "bFilter": false,
    "iDisplayLength ": 25,
    "bLengthChange": false,
    "bPaginate": false,
    "bInfo": false,
    "bSort": false,
    "sDom": 'T<"clear">lfrtip',
    "oTableTools": {
    "sSwfPath": "copy_cvs_xls_pdf.swf",
    "aButtons": [
    {
    "sExtends": "copy",
    "fnComplete": null,
    },
    {
    "sExtends": "pdf",
    "sToolTip": "Save as PDF"
    },
    {
    "sExtends": "xls",
    "sToolTip": "Save as CSV"
    }

    ]
    });
This discussion has been closed.