Chromium Code Reviews| Index: chrome/browser/resources/ntp4/tile_page.js |
| diff --git a/chrome/browser/resources/ntp4/tile_page.js b/chrome/browser/resources/ntp4/tile_page.js |
| index cf3a3bbdd3fd2c0714002e45b9ebaffb8136800f..b2b922288b4dfb650d869d8f7f8d550f5f7b5e60 100644 |
| --- a/chrome/browser/resources/ntp4/tile_page.js |
| +++ b/chrome/browser/resources/ntp4/tile_page.js |
| @@ -158,7 +158,10 @@ cr.define('ntp4', function() { |
| if (this.landedOnTrash) { |
| this.dragClone.classList.add('deleting'); |
| } else if (this.tilePage) { |
| - if (this.tilePage.selected && e.dataTransfer.dropEffect != 'copy') { |
| + // HACK(dbeam): Until we fix dropEffect to the correct behavior it will |
|
csilv
2011/09/13 18:57:24
Change this to a TODO comment instead.
Dan Beam
2011/09/13 22:19:13
Done.
|
| + // differ on windows - crbug.com/39399. That's why we use the custom |
| + // .tilePage.lastDropEffect_ instead of e.dataTransfer.dropEffect. |
| + if (this.tilePage.selected && this.tilePage.lastDropEffect_ != 'copy') { |
| // The drag clone can still be hidden from the last drag move event. |
| this.dragClone.hidden = false; |
| // The tile's contents may have moved following the respositioning; |
| @@ -927,9 +930,19 @@ cr.define('ntp4', function() { |
| if (newDragIndex < 0 || newDragIndex >= this.tileElements_.length) |
| newDragIndex = this.dragItemIndex_; |
| this.updateDropIndicator_(newDragIndex); |
| + |
| + this.lastDropEffect_ = e.dataTransfer.dropEffect; |
| }, |
| /** |
| + * Normalizing dropEffect until all platform's implementations agree. Right |
| + * now Windows resets the dropEffect on a 'drop' back to 'copy' (and |
| + * disregards the previous state), so we're making a temporary shim to keep |
| + * our own state for now based on each dragover. |
| + */ |
| + lastDropEffect_: null, |
|
csilv
2011/09/13 18:57:24
Is it necessary to do this? (ie, wont the default
Dan Beam
2011/09/13 22:19:13
Done.
|
| + |
| + /** |
| * Performs all actions necessary when the user completes a drop. |
| * @param {Event} e A mouseover event for the drag drop. |
| */ |