Posted by mattyoung on June 11, 2009 at 7:08pm
Jump to:
| Project: | Drupal core |
| Version: | 6.22 |
| Component: | javascript |
| Category: | bug report |
| Priority: | major |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
| Issue tags: | tabledrag |
Issue Summary
Drag and re-order fields doesn't work in google chrome on WinXP (path: admin/content/node-type/CONTENT-TYPE/fields)
I saw two problems:
1) click and drag but drop never happen: drag the field to a new location, release the mouse button to drop, but the dragged action continue. And the changed status feedback * is not shown. I had to carefully move the mouse point left outside of the fields, press the left mouse button several times to "kill" the drag.
2) Save and the field order is not changed.
Comments
#1
I'm also seeing this same behavior on Drupal 6.17 with Chrome 5.0.375.99 for Windows and Safari 5.0.1 build 7533.17.8 for Windows.
However, this appears corrected for taxonomy vocabularies in the latest Chrome release, 5.0.375.125, which was released on 2010-07-27. However, the issue persists for dragging menu items, dragging around UberCart product options, etc.
For now, the keyboard shortcuts mentioned in a usability post here on Drupal.org seem to be a workaround.
#2
Correction: keyboard shortcuts fail to update the weight as well. Damn. Webkit bug on Windows, perhaps?
#3
What happens when you do this?
1) Click the wrench in the upper right of the Chrome window
2) Select Tools > JavaScript Console
3) Do what ever you do that doesn't work
4) Look at JavaScript console
#4
I'm classifying this priority as major because it affects many core and contributed components.
#5
I can't get this bug to show up in Chrome 6 on Ubuntu 9.04.
#6
I can confirm that this bug occurs with Chrome 6 on Windows 7, so I recommend looking at it on any Windows machine. (Little more common for the end user than Ubuntu.) The only workaround I have found is to switch to IE and finish my task.
#7
Alright, sorry. More useful comment.
Did as you asked in #3 and got this:
/misc/tabledrag.js?w:1019Uncaught TypeError: Property 'function (D,E){var C=E||window;for(var B=0,A=this.length;B<A;++B){D.call(C,this[B],B,this)}}' of object #<an Object> is not a function#8
More interesting testing information: This problem does not seem to occur with Acquia Drupal, I'm running a few sites with the latest distribution and I don't have this issue. So, if it is caused by a conflict of some sort it does not seem to effect Acquia sites.
#9
I'm on a Mac (OS X 10.6) and I have this issue in Chrome & Safari but not in Firefox. I get the same error message as jenyum.
#10
Chrome & Windows 7
same error in all browsers, but not all my sites
js console says:
Uncaught TypeError: Property 'function (b){var i=this.length,j,t;while(i){j=Math.floor((i--)*Math.random());t=b&&typeof this[i].shuffle!=='undefined'?this[i].shuffle():this[i];this[i]=this[j];this[j]=t;}return this;}' of object # is not a function
Drupal.tableDrag.row.findSiblingstabledrag.js:998
Drupal.tableDrag.updateFieldtabledrag.js:677
Drupal.tableDrag.updateFieldstabledrag.js:577
Drupal.tableDrag.dropRowtabledrag.js:436
(anonymous function)tabledrag.js:93
o.event.handlejquery.min.js:19
J.o.data.I.handle.o.data.I.handle
#11
I'm having this issue with Chrome 9.0.597.84 Mac OS X 10.6.5.
#12
I wonder if it's a conflict with a particular chrome add-on?
Or a particular contrib module?
Can folks report if they are using any chrome add-ons or Drupal contribs on pages where you have this problem?
#13
More info needed per #12.
#14
I have a different error than the one reported by #7 and #10, I'm testing Firefox 3.6.13 and Chrome 9.0.597.102 on Mac OS X 10.6.6 and I get the following errors when I drop the row:
Firefox:
Error: $(this.element)[directions[d]] is not a function
File: /sites/all/modules/jquery_update/replace/tabledrag.js?G
Line: 998
Chrome:
On the same file/line:
Uncaught TypeError: Property 'function (wot){
var L= this.length;
var i= 0;
while(i< L){
if(this[i]=== wot)return i;
++i;
}
return -1;
}' of object # is not a function
All this seems directly related to the jquery_update module, so I will look there too....
#15
Having this issue with Chrome 10.0.648.204
None of the reordering/tabledrag saves in Chrome. From core blocks to image reordering - can drag and change but on save it reverts to original order.
No plugins or anything installed, just plain chrome. Reordering works fine in everything else
#16
I CANNOT recreate this issue with Chrome. I am using various set-ups here and simply cannot recreate the issue.
#17
I had this problem in both Chrome and Safari on Mac. It was driving me crazy.
If I replace line 1018 in tabledrag.js with the following:
for (d=0; d < directions.length; d++) {
...then the function works. It's definitely a webkit JavaScript bug. Annoying that the original code should work, but doesn't.
#18
Thank you! This saved my day.
I had the same problem in Internet Explorer en that's fixed now too.
#19
you are literally my hero of the day!
thanks for this
for those with jquery_update in this is line 1000
#20
Setting to fixed as #17 presents a solution. It appears anyways that this isn't a Drupal core problem or a Drupal issue at all.
#21
I have no problem with chrome 12, 13, safari 5 on Mac.
#22
Automatically closed -- issue fixed for 2 weeks with no activity.
#23
It seems to me this is not actually "fixed". #20 suggests that it is fixed based on #17, which is a workaround, not a patch that has been committed, and therefore this is a duplicate of #800968: tabledrag.js should not use for...in to iterate over an array which is committed to D7 and needs a backport to D6.