Modify ↓
Opened 15 years ago
Closed 14 years ago
#8245 closed defect (fixed)
Plugin does not work with Chrome 7.0.517.44 on OS X
| Reported by: | Kamil Kisiel | Owned by: | Jun Omae |
|---|---|---|---|
| Priority: | normal | Component: | TracDragDropPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 0.12 |
Description
As advertised is it should work with Chrome 4+, but it doesn't seem to work Chrome 7.0.517.44. The drag-and-drop enabled message only appears when I test with FireFox.
Attachments (0)
Change History (6)
comment:1 Changed 15 years ago by
| Status: | new → assigned |
|---|
comment:2 Changed 15 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
If you can reproduce it, please reopen the issue.
comment:3 Changed 15 years ago by
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
comment:4 Changed 14 years ago by
Now, Chrome was dropped gears and the browser doesn't have xhr.sendAsBinary() method.
See http://code.google.com/p/chromium/issues/detail?id=35705 .
So I made a simple patch to fix it.
Index: tracdragdrop.js
===================================================================
--- tracdragdrop.js (revision 11504)
+++ tracdragdrop.js (working copy)
@@ -3,6 +3,16 @@
setup: function() {
new FileReader();
var xhr = new XMLHttpRequest();
+ if (window.navigator.userAgent.toLowerCase().indexOf("chrome") > -1) {
+ XMLHttpRequest.prototype.sendAsBinary = function(datastr){
+ function byteValue(x){
+ return x.charCodeAt(0) & 0xff;
+ }
+ var ords = Array.prototype.map.call(datastr, byteValue);
+ var ui8a = new Uint8Array(ords);
+ this.send(ui8a.buffer);
+ }
+ }
return xhr.upload && xhr.sendAsBinary ? true : false;
},
createXMLHttpRequest: function(options) {
comment:5 Changed 14 years ago by
Thanks for yours reporting and patch!
The issue is fixed in [11505]. Please try the latest.
comment:6 Changed 14 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | reopened → closed |
Note: See
TracTickets for help on using
tickets.



Which revision of the plugin do you use? In [9288], I fixed the problem that does not work with Google Chrome 6+. If possible, try the latest.