Tao Li created ZEPPELIN-3081:
--------------------------------
Summary: Data downloading issue on Microsoft Edge browser
Key: ZEPPELIN-3081
URL: https://issues.apache.org/jira/browse/ZEPPELIN-3081
Project: Zeppelin
Issue Type: Bug
Components: front-end
Reporter: Tao Li
We are running into an Angular JS issue with Edge browser when downloading the
CSV files by using the Zeppelin download tool, as shown below. The issue is
that the download functionality is not triggered when hitting the button on
Edge browser, while it works for Chrome.
By looking at Zeppelin JS code, the issue is from here:
https://github.com/apache/zeppelin/blob/b21f89f6fe8dfe209ee6e827b6092c2ae9fe7314/zeppelin-web/src/app/notebook/save-as/save-as.service.js#L51
The reason that downloading was not happening is because click() did not have
any effect for the element “saveAsElement[0].click()”
This is the element: <a id="SaveAsId"
href="blob:DA0847A8-4FE4-48B7-81E7-230874E3E88C" target="_blank"
download="test"></a>
Below is my debugging code and result on Edge browser. Nothing happened when
running the last line: “saveAsElement[0].click()”. On Chrome the same code will
trigger the csv file download. I suspect this is due to some compatibility
issue with Angular JS on Edge.
Debugging code:
binaryData = []
content = window.URL.createObjectURL(new Blob(binaryData))
angular.element('body').append('<a id="SaveAsId"></a>')
saveAsElement = angular.element('body > a#SaveAsId')
saveAsElement.attr('href', content)
saveAsElement.attr('download', 'test')
saveAsElement.attr('target', '_blank')
saveAsElement[0]
//<a id="SaveAsId" href="blob:DA0847A8-4FE4-48B7-81E7-230874E3E88C"
target="_blank" download="test"></a>
saveAsElement[0].click()
// Nothing happens on Edge
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)