Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Extension application reloads after downloading file programatticaly

We're trying to create an excel file programatically and download within Symphony desktop application, however when this operation is performed the extension application reloads. Following snippet is for downloading a text file which also gives same behavior:

download() {
    var element = document.createElement('a');
    element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent("This is a sample text"));
    element.setAttribute('download', "Test.txt");
  
    element.style.display = 'none';
    document.body.appendChild(element);
  
    element.click();
  
    document.body.removeChild(element);
  }

This issue is observed when file is downloaded for the first time. After that a download bar appears at the bottom and if the bar is there then next time app won't refresh. Though if the bar is removed then app reloads again.

Please note this issue is only observed in desktop app but works fine in Chrome browser.

  
  
Posted 2 years ago
Edited 2 years ago
Votes Newest

Answers


Hi Ankit,

Sometimes browsers (or embedded browsers in a desktop app) have different behaviours that we cannot really fix. The best is to try an alternative or workaround. Did you try to not add the anchor element to the body itself but to an intermediary hidden iFrame element?

Olivier.

  
  
Posted 2 years ago
Edited 2 years ago
Olivier Poupeney
10 × 1 Administrator
2K Views
1 Answer
2 years ago
2 years ago
Tags