Closed (duplicate)
Project:
Drupal core
Version:
6.22
Component:
javascript
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Jun 2009 at 19:08 UTC
Updated:
27 Sep 2011 at 05:05 UTC
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
Comment #1
guypaddock commentedI'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.
Comment #2
guypaddock commentedCorrection: keyboard shortcuts fail to update the weight as well. Damn. Webkit bug on Windows, perhaps?
Comment #3
Daniel Norton commentedWhat 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
Comment #4
Daniel Norton commentedI'm classifying this priority as major because it affects many core and contributed components.
Comment #5
gregglesI can't get this bug to show up in Chrome 6 on Ubuntu 9.04.
Comment #6
jenyum commentedI 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.
Comment #7
jenyum commentedAlright, 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 functionComment #8
jenyum commentedMore 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.
Comment #9
merneck commentedI'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.
Comment #10
off commentedChrome & 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
Comment #11
calte commentedI'm having this issue with Chrome 9.0.597.84 Mac OS X 10.6.5.
Comment #12
gregglesI 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?
Comment #13
dddave commentedMore info needed per #12.
Comment #14
opsidao commentedI 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....
Comment #15
sansui commentedHaving 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
Comment #16
dddave commentedI CANNOT recreate this issue with Chrome. I am using various set-ups here and simply cannot recreate the issue.
Comment #17
Keith Marran commentedI 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.
Comment #18
DizzyMissLizzy commentedThank you! This saved my day.
I had the same problem in Internet Explorer en that's fixed now too.
Comment #19
chrisns commentedyou are literally my hero of the day!
thanks for this
for those with jquery_update in this is line 1000
Comment #20
dddave commentedSetting to fixed as #17 presents a solution. It appears anyways that this isn't a Drupal core problem or a Drupal issue at all.
Comment #21
mattyoung commentedI have no problem with chrome 12, 13, safari 5 on Mac.
Comment #23
mstrelan commentedIt 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.