Skip to content

Commit

Permalink
[mms] Workaround Chrome bug preventing drag/drop of attachments in dy…
Browse files Browse the repository at this point in the history
…namic compose (Bug #12418).
  • Loading branch information
slusarz committed Jul 16, 2013
1 parent d42448c commit 22b292e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions imp/docs/CHANGES
Expand Up @@ -2,6 +2,8 @@
v6.1.3-git
----------

[mms] Workaround Chrome bug preventing drag/drop of attachments in dynamic
compose (Bug #12418).
[mms] Better handle transient mail server connection issues in basic and
minimal views.
[mms] Fix regression of redirect message not working in dynamic view (Bug
Expand Down
14 changes: 13 additions & 1 deletion imp/js/compose-dimp.js
Expand Up @@ -834,7 +834,6 @@ var DimpCompose = {

HordeCore.doAction('addAttachment', {}, {
ajaxopts: {
contentType: 'multipart/form-data',
postBody: fd,
requestHeaders: { "content-type": '' }
},
Expand Down Expand Up @@ -1302,3 +1301,16 @@ document.observe('ImpPassphraseDialog:success', DimpCompose.retrySubmit.bind(Dim
document.observe('HordeCore:runTasks', function(e) {
this.tasksHandler(e.memo);
}.bindAsEventListener(DimpCompose));


/* Fix Ajax.Request#setRequestHeaders() behavior (Bug #12418). */
Ajax.Request.prototype.setRequestHeaders = Ajax.Request.prototype.setRequestHeaders.wrap(function(orig) {
this.transport.setRequestHeader = this.transport.setRequestHeader.wrap(function(orig2, name, val) {
// Don't add headers if value is empty. Due to Bug #44438 in Chrome,
// we can't prevent default headers from being sent.
if (!val.empty()) {
orig2(name, val);
}
});
orig();
});
2 changes: 2 additions & 0 deletions imp/package.xml
Expand Up @@ -33,6 +33,7 @@
</stability>
<license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
<notes>
* [mms] Workaround Chrome bug preventing drag/drop of attachments in dynamic compose (Bug #12418).
* [mms] Better handle transient mail server connection issues in basic and minimal views.
* [mms] Fix regression of redirect message not working in dynamic view (Bug #12417).
* [jan] Fix link to setup browser for mailto: protocol.
Expand Down Expand Up @@ -3248,6 +3249,7 @@
<date>2013-07-15</date>
<license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
<notes>
* [mms] Workaround Chrome bug preventing drag/drop of attachments in dynamic compose (Bug #12418).
* [mms] Better handle transient mail server connection issues in basic and minimal views.
* [mms] Fix regression of redirect message not working in dynamic view (Bug #12417).
* [jan] Fix link to setup browser for mailto: protocol.
Expand Down

0 comments on commit 22b292e

Please sign in to comment.