Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2933

in Firefox, AU is disabled after downloading a file, using the same page as target

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Later Later
    • None
    • None
    • None
    • Security Level: Jimmy
    • None
    • Firefox, chrome,
      Does not happen on IE

      Steps to reproduce

      When clicking a link to download a file, if the target is the same page (target="_self"), a desktop cleanup (rmDesktop) is triggered, which stops the client engine.

      Root cause

      See attached example
      Button send a request and display an alert (to test the activity of the client engine)
      the "with blank target" link open the download in a new tab
      the "with selft target" link open the download in the current page.

      Workaround

      1. target='_blank'

      2. download attribute

      <zk xmlns:c="client/attribute">
      <a href="report.xls" c:download="" target='_self'>download</a>
      </zk>
      

      ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download

      3. hidden iframe

      <a target="dltarget" href="http://localhost:8080/tabbox_problem/test.zip">Link Link liiiiinkk bling bling</a>
      <button id="btn" label="Click me first, then link and again me, second click will not fire messagebox" />
      <iframe style="display:none" name="dltarget"/>
      

        1. test.xls
          0.0 kB
        2. test.zul
          0.2 kB

            jumperchen jumperchen
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: