Mouse buttons and Gecko

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Mouse buttons and Gecko

Wellington L.S. da Silva
Hi Everybody,

My name is Wellington and I'm from Brazil. I'm working is a GNU open source
GIS framework for the UN. Now, the framework and all applications we've
built with it work quite nicely with IEx. It even work quite nicely with
Netscape Navigator, IF we choose the IEx layout engine. However, for my
deepest disappointment, whenever we use GECKO layout, it reverse the actions
of the mouse buttons, be it in Firefox, Netscape or Mozilla (hence my
suspect). The Javascript functionality behind those actions remain working
fine, and it was updated to cope with the latest DOM (that's why I'm almost
ruling out JS). But the mistery lies in the reversal of the mouse buttons.

Specifically, there's a map and we mark a region of the map for zooming. So
it's a mousedown, followed by mouse move, then mouseup. If we use the left
button for that (the standard action), it works nicely under the above
conditions. Under Gecko, once I try to MOVE the mouse, the forbidden cursor
appears and the mouse movement is lost. However, if I use the right button,
it works fine.
There's lots of Javascript involved, so I didn't want to attach something
before having any clue about where the cause could lie.

Any clues? Can it be related to JS, CSS, or DOM?

After posting this problem to the Firefox support list, it was suggested
that the problem could be being caused by an incorrect interpretation of the
event.button attribute of the event. I scanned the code and all references
to event.button are correct. ny clues?? Is there a way to know if I'm using
Gecko or not from inside a Javascript scriptlet?

Nice to be part of the list.

Thanks,
Wellington
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: Mouse buttons and Gecko

Martijn-4
On 8/24/06, Wellington L.S. da Silva <[hidden email]> wrote:

> Hi Everybody,
>
> My name is Wellington and I'm from Brazil. I'm working is a GNU open source
> GIS framework for the UN. Now, the framework and all applications we've
> built with it work quite nicely with IEx. It even work quite nicely with
> Netscape Navigator, IF we choose the IEx layout engine. However, for my
> deepest disappointment, whenever we use GECKO layout, it reverse the actions
> of the mouse buttons, be it in Firefox, Netscape or Mozilla (hence my
> suspect). The Javascript functionality behind those actions remain working
> fine, and it was updated to cope with the latest DOM (that's why I'm almost
> ruling out JS). But the mistery lies in the reversal of the mouse buttons.
>
> Specifically, there's a map and we mark a region of the map for zooming. So
> it's a mousedown, followed by mouse move, then mouseup. If we use the left
> button for that (the standard action), it works nicely under the above
> conditions. Under Gecko, once I try to MOVE the mouse, the forbidden cursor
> appears and the mouse movement is lost. However, if I use the right button,
> it works fine.

It sounds like a dragging action gets involved in that case. So I
think you want to prevent that dragging action from happening.

> There's lots of Javascript involved, so I didn't want to attach something
> before having any clue about where the cause could lie.

Well, in general, you should show an url or example that shows the
problem in order for others to get a clue of what the cause could be.

Regards,
Martijn

> Any clues? Can it be related to JS, CSS, or DOM?
>
> After posting this problem to the Firefox support list, it was suggested
> that the problem could be being caused by an incorrect interpretation of the
> event.button attribute of the event. I scanned the code and all references
> to event.button are correct. ny clues?? Is there a way to know if I'm using
> Gecko or not from inside a Javascript scriptlet?
>
> Nice to be part of the list.
>
> Thanks,
> Wellington
> _______________________________________________
> dev-tech-layout mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-layout
>
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: Mouse buttons and Gecko

Wellington L.S. da Silva
Thanks to Martijn, I've solved the problem IN NO TIME!

The funny mouse behavior in fact is a default drag action initiated by the
browser under Gecko layout. Using event.preventDefault() solved it.

Thanks to Martijn and all!
Wellington


2006/8/24, Martijn <[hidden email]>:

>
> On 8/24/06, Wellington L.S. da Silva <[hidden email]> wrote:
> > Hi Everybody,
> >
> > My name is Wellington and I'm from Brazil. I'm working is a GNU open
> source
> > GIS framework for the UN. Now, the framework and all applications we've
> > built with it work quite nicely with IEx. It even work quite nicely with
> > Netscape Navigator, IF we choose the IEx layout engine. However, for my
> > deepest disappointment, whenever we use GECKO layout, it reverse the
> actions
> > of the mouse buttons, be it in Firefox, Netscape or Mozilla (hence my
> > suspect). The Javascript functionality behind those actions remain
> working
> > fine, and it was updated to cope with the latest DOM (that's why I'm
> almost
> > ruling out JS). But the mistery lies in the reversal of the mouse
> buttons.
> >
> > Specifically, there's a map and we mark a region of the map for zooming.
> So
> > it's a mousedown, followed by mouse move, then mouseup. If we use the
> left
> > button for that (the standard action), it works nicely under the above
> > conditions. Under Gecko, once I try to MOVE the mouse, the forbidden
> cursor
> > appears and the mouse movement is lost. However, if I use the right
> button,
> > it works fine.
>
> It sounds like a dragging action gets involved in that case. So I
> think you want to prevent that dragging action from happening.
>
> > There's lots of Javascript involved, so I didn't want to attach
> something
> > before having any clue about where the cause could lie.
>
> Well, in general, you should show an url or example that shows the
> problem in order for others to get a clue of what the cause could be.
>
> Regards,
> Martijn
>
> > Any clues? Can it be related to JS, CSS, or DOM?
> >
> > After posting this problem to the Firefox support list, it was suggested
> > that the problem could be being caused by an incorrect interpretation of
> the
> > event.button attribute of the event. I scanned the code and all
> references
> > to event.button are correct. ny clues?? Is there a way to know if I'm
> using
> > Gecko or not from inside a Javascript scriptlet?
> >
> > Nice to be part of the list.
> >
> > Thanks,
> > Wellington
> > _______________________________________________
> > dev-tech-layout mailing list
> > [hidden email]
> > https://lists.mozilla.org/listinfo/dev-tech-layout
> >
>
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout