Drag and Drop reordering incorrect in lists (search engines list)

RESOLVED FIXED in Firefox 2 beta2

Status

()

Firefox
Search
--
minor
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: Johannes Buchner, Assigned: Gavin)

Tracking

({fixed1.8.1})

2.0 Branch
Firefox 2 beta2
fixed1.8.1
Points:
---
Bug Flags:
blocking-firefox2 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
If you take a search engine A from the search engine list and put it between C and D, you get a wrong ordering (shifted by one, in move direction):

before: 
A
B ____ you put it A here
C

after, you get: 
B ____ you wanted it here
C ____ it went after C
A

Therefore, if you move the second search engine under or above the first, you will get the same result.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060731 Minefield/3.0a1
I can reproduce this intermittently on both branch and trunk. Requesting blocking.
Flags: blocking-firefox2?
I've seen this too, but I suspect it's a problem with the win32 drag&drop code, and not something specific to the search engine manager. I don't think this should block at this point, since the engine sometimes dropping one position off from where you wanted it isn't such a big deal, but I'll look into this and try to see what causes it.
Version: Trunk → 2.0 Branch
Actually, gavin, this is a little polish thing that we probably want to at least understand if not ensure that we get right. Let us know what you find out.
Flags: blocking-firefox2? → blocking-firefox2+
Target Milestone: --- → Firefox 2 beta2
Created attachment 231784 [details] [diff] [review]
patch

This is a problem with the engine tree's drop/canDrop implementations. For canDrop, we don't want to drop on an engine if we're directly before or after the dragged item (dragging something directly before or after itself has no effect). For drop, we should substract one from the drop index if the orientation is "before" and we're moving down, or add one if the orientation is "after" and we're moving down.
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Attachment #231784 - Flags: review?(mconnor)

Updated

12 years ago
Attachment #231784 - Flags: review?(mconnor) → review+
Whiteboard: [checkin needed]
OS: Windows XP → All
Hardware: PC → All
mozilla/browser/components/search/content/engineManager.js 	1.10
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed] → [needs approval]
Attachment #231784 - Flags: approval1.8.1?

Comment 6

12 years ago
Comment on attachment 231784 [details] [diff] [review]
patch

a=schrep for drivers.
Attachment #231784 - Flags: approval1.8.1? → approval1.8.1+
mozilla/browser/components/search/content/engineManager.js 	1.1.2.12
Keywords: fixed1.8.1
Whiteboard: [needs approval]
You need to log in before you can comment on or make changes to this bug.