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)
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...
Comment 1•23 years ago
|
||
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
Comment 2•23 years ago
|
||
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
![]() |
||
Comment 3•23 years ago
|
||
Yeah, that looks correct to me.... Does changing the last arg (the capture arg)
to "false" change anything?
![]() |
||
Comment 4•23 years ago
|
||
*** Bug 148763 has been marked as a duplicate of this bug. ***
Comment 5•22 years ago
|
||
*** Bug 161518 has been marked as a duplicate of this bug. ***
Comment 6•22 years ago
|
||
what's new ?
Comment 7•22 years ago
|
||
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
Comment 8•22 years ago
|
||
this bug isn't resolved !!!
![]() |
||
Comment 9•22 years ago
|
||
Yep, reopening. Quite broken on Linux trunk build 2003-01-31-22.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Comment 10•22 years ago
|
||
i have this bug with build 2003021005 under windows xp !
:'(
Comment 11•22 years ago
|
||
...
Comment 12•22 years ago
|
||
could'nt include this fonction in the next mozilla release ?
(www.viamichelin.com is a leader site...)
![]() |
||
Comment 13•22 years ago
|
||
This is impossible to fix without a small testcase pointing out what actually
fails....
Keywords: qawanted
Comment 14•22 years ago
|
||
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?
![]() |
||
Comment 15•22 years ago
|
||
See bug 102695
Comment 16•22 years ago
|
||
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.
![]() |
||
Comment 17•22 years ago
|
||
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
Comment 18•22 years ago
|
||
You're very welcome.
Updated•22 years ago
|
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.
Comment 19•22 years ago
|
||
*** Bug 193028 has been marked as a duplicate of this bug. ***
Comment 20•22 years ago
|
||
site is french, main language is french, moving to french component :)
Assignee: nitot → french
Component: Europe: West → French
QA Contact: brantgurganus2001 → french
Comment 21•22 years ago
|
||
It works for me now.
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
Comment 22•22 years ago
|
||
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
Comment 23•22 years ago
|
||
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 :)
Comment 24•22 years ago
|
||
-> WFM (per previous comments)
Status: NEW → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → WORKSFORME
Updated•10 years ago
|
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•