Closed Bug 150906 Opened 23 years ago Closed 22 years ago

viamichelin.com - Select a map region does not work, selection line does (not) stick.

Categories

(Tech Evangelism Graveyard :: French, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED WORKSFORME

People

(Reporter: ewl+mozilla, Unassigned)

References

()

Details

(Keywords: qawanted)

when going to the URL http://www.viamichelin.com and searching for a map (e.g. City=Grenoble, Address=alsace-lorraine), you get a map where you can theoretically (works with IE5.5) select a region to zoom in. With Moz1.0 and preceding, the selection rectangle sticks to the mouse cursor and not to the map, and it's therefore not possible to zoom in this way. I got the same problem with Linux and Windows2000, Mozilla since 0.9.? until 1.0 final. I recognize that might be an evangelism problem but as I don't speak JavaScript...
Confirming report with Mozilla trunk binary 20020617xx on WinNT. In http://www.viamichelin.com/viamichelin/gbr/js/map/drag2.js there are functions like this: function mouseMove(e) { var mouseX = (ns||moz ? e.pageX : event.clientX + document.body.scrollLeft); var mouseY = (ns||moz ? e.pageY : event.clientY + document.body.scrollTop); if (isClick) { showSelection(mouseX, mouseY); return false; } return true; } See that flag |isClick|? It gets set to |true|, and never seems to get set to |false| in Mozilla. The only place that can happen is in a function called MouseUp(). However, setting a breakpoint in the Mozilla JS Debugger shows that function never gets called! Note: here's where the event handlers are bound to the events: if (moz) { var theDiv = document.getElementById("region"); SelectionDiv = document.getElementById("selection"); CrossDiv = document.getElementById("centerpoint"); minX = parseInt(theDiv.style.left); maxX = minX + parseInt(theDiv.style.width); minY = parseInt(theDiv.style.top); maxY = minY + parseInt(theDiv.style.height); CrossDiv.style.left = minX + (maxX - minX) / 2 - 10; CrossDiv.style.top = minY + (maxY - minY) / 2 - 10; theDiv.addEventListener("mousedown",mouseDown,false); theDiv.addEventListener("mousemove",mouseMove,true); theDiv.addEventListener("mouseup",mouseUp,true);
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reassigning to DOM Events - cc'ing jst, bzbarsky, jkeiser - are they using correct syntax to bind the event handlers?
Assignee: rogerl → joki
Component: JavaScript Engine → DOM Events
QA Contact: pschwartau → vladimire
Yeah, that looks correct to me.... Does changing the last arg (the capture arg) to "false" change anything?
*** Bug 148763 has been marked as a duplicate of this bug. ***
*** Bug 161518 has been marked as a duplicate of this bug. ***
what's new ?
This is working on buid 2002-12-20-08-trunk. win 2k and 7.01 build on mac osx
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
this bug isn't resolved !!!
Yep, reopening. Quite broken on Linux trunk build 2003-01-31-22.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
i have this bug with build 2003021005 under windows xp ! :'(
...
could'nt include this fonction in the next mozilla release ? (www.viamichelin.com is a leader site...)
This is impossible to fix without a small testcase pointing out what actually fails....
Keywords: qawanted
I started making a test case, but I think the bug is in the web page, not Mozilla. The resizable selection "rubber band" on the page is actually the border of an absolutely positioned div element (id=ViaM_selection). Once the mouseDown event makes that div visible, the mouseMove event keeps resizing it so that it always extends out to the mouse cursor location. Therefore, when you release the mouse button, the cursor is over the corner of the selection div, and it receives the event instead of the div beneath (id=ViaM_region) that the mouseUp handler is actually tied to. (The only reason the mouseMove event reaches the handler on the div beneath is because the mouse cursor was just moved off the corner of the selection div. In fact, if you try to resize the selection area smaller, it doesn't work.) They did pass true for the useCapture parameter of addEventListener, but if read the DOM Level 2 spec right it sounds like event capture only happens on elements that are ancestors in the document tree structure, not elements that just happen to contain another element visually. The selection div is not a descendent node of the div beneath it visually. Is my interpretation of the spec correct? The site does include Mozilla/Netscape 6-7 specific code branches, so ViaMichelin isn't ignoring Mozilla. I don't know if it's a simple bug or a misunderstanding of the DOM Level 2 Events spec, probably just a bug. Would this be something for tech evangelism?
Unless borders don't count, I don't think this page would work even if transparent areas were made transparent to events (bug 102695). The mouse cursor is usually over the div's visible border.
Ah. In that case, evangelism. Dean, thanks for debugging this!
Assignee: joki → nitot
Status: REOPENED → NEW
Component: DOM Events → Europe: West
Product: Browser → Tech Evangelism
QA Contact: vladimire → brantgurganus2001
Version: Trunk → unspecified
You're very welcome.
Summary: Select a map region does not work, selection line does (not) stick. → viamichelin.com - Select a map region does not work, selection line does (not) stick.
*** Bug 193028 has been marked as a duplicate of this bug. ***
site is french, main language is french, moving to french component :)
Assignee: nitot → french
Component: Europe: West → French
QA Contact: brantgurganus2001 → french
It works for me now. Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
Works for me as well! Fantastic job, well done and thank you very much! Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20030701
Wfm with mozilla 1.4 as well. what shall we change the resolution to ? I don't know if the problem was with the site or with moz :)
-> WFM (per previous comments)
Status: NEW → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → WORKSFORME
verified.
Status: RESOLVED → VERIFIED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.