[OpenLayers-Dev] mouse wheel on popups

Christopher Schmidt crschmidt at metacarta.com
Thu Feb 28 21:34:10 EST 2008


On Mon, Feb 25, 2008 at 11:39:37AM +0100, Pierre GIRAUD wrote:
> Hello Erik, Tim and all,
> 
> I would first like to congratulate Erik for his great and useful job
> on the new popups. It sounds like it's almost ready to go in.
> However, there are still some issues to fix.
> 
> The most important for me (and a customer I work on this for) is the
> ability to scroll the popup content without any interaction with the
> map (avoid zoom in/out).
> 
> I first wondered I we were able to prevent map from zooming when
> wheeling on controls UI's (LayerSwitcher, panZoomBar) and proposed a
> simple patch to fix this. [1]

I actually like this approach, though it doesn' actually work: Erik has
put together a patch that does with a slightly higher cost, but not
sufficiently higher to be troublesome, I expect.

However, what I've realized is that the 'inMap' event.stop doesn't
actually work, because it stops scrolling in both the popup and the
page. (At least, in Firefox, it does: In Safari, it stops neither.)

It seems like there's no way to allow popup scrolling without also
allowing the event to fall through to the map and scroll the page,
unless I'm misunderstanding. 

That said, this matches the behavior of any other overflow:auto content
inside a larger page: the content scrolls until it reaches the bottom of
the scrollable area, then the page scrolls. With that in mind, I'm not
convinced that there's any serious problems with usability of the
current patch on [1], but it sounds like you think there might be some:
can you explain what they are?

> [1] http://trac.openlayers.org/ticket/1382

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list