   render: ->
     confirmDisabled = @confirmDisabled()
 
+    # for modern browsers
+    downloadAnchor = (a {
+      href: '#'
+      ref: 'download'
+      className: (if confirmDisabled then 'disabled' else '')
+      download: @state.downloadFilename
+      onContextMenu: @contextMenu
+    }, tr '~FILE_DIALOG.DOWNLOAD')
+
+    # for Safari (or other non-modern browsers)
+    downloadButton = (button {
+      ref: 'download'
+      className: (if confirmDisabled then 'disabled' else '')
+    }, tr '~FILE_DIALOG.DOWNLOAD')
+
     (div {className: 'dialogTab localFileSave'},
       (input {type: 'text', ref: 'filename', value: @state.filename, placeholder: (tr "~FILE_DIALOG.FILENAME"), onChange: @filenameChanged, onKeyDown: @watchForEnter}),
       (div {className: 'saveArea'},

        provider: @props.provider
      @props.dialog.callback metadata
      @props.close()
    else
      e?.preventDefault()
    return

      )
      div({className: 'note'}, tr('~FILE_DIALOG.DOWNLOAD_NOTE', {download: tr('~FILE_DIALOG.DOWNLOAD')}))
      (div {className: 'buttons'},
        if @state.supportsDownloadAttribute then downloadAnchor else downloadButton
        (button {onClick: @cancel}, (tr "~FILE_DIALOG.CANCEL"))
      )
    )