[OpenLayers-Dev] Touch events do not trigger the defalut action in attribution links

Marc Jansen jansen at terrestris.de
Wed Aug 1 00:45:20 PDT 2012


Hi all,

Here is the ticket: https://github.com/openlayers/openlayers/issues/612

Can you probably give more guidance on how to address the issue? As the 
events are at the very core of the library I want to make extra sure I 
do not break anything.

For example, where exactly would you check the nature of the original 
event?

By "unconditionally" you probably mean that when the target of the touch 
event was e.g. a link (button, etc.), the default action of the element 
shouldn't be prevented, right?

Regards & many thanks,
Marc


On 31.07.2012 18:23, Andreas Hocevar wrote:
> I would also consider this a bug. Please create a ticket.
>
> A potential fix would involve not calling preventDefault on
> mousedown/touchdown events unconditionally.
>
> Andreas.
>
> On Tue, Jul 31, 2012 at 4:34 PM, Marc Jansen <jansen at terrestris.de> wrote:
>> Hi all,
>>
>> I stumbled upon an IMHO unwanted behaviour in OpenLayers when it is being
>> accessed with devices that issue touch events (smartphones and tablets both
>> with iOS or Android):
>>
>> When an attribution of a layer contains a link (an <a
>> href="http://example.com/">Text</a>) the link does not work, e.g. it does
>> not follow the links href and does not open the appropriate URL.
>>
>> This can easily be observed in the online examples, e.g. here:
>> http://openlayers.org/dev/examples/osm.html (the link to the osm page is not
>> functional on touch devices).
>>
>> The behaviour can also be observed from mwithin Chrome when the "User-Agent"
>> setting " Emulate touch events" of the developer toolbar is activated.
>>
>> I would consider this behaviour a bug and would like to hear your opinions.
>>
>> The IMHO wrong behaviour was introduced after 2.11, as the example
>> http://dev.openlayers.org/releases/OpenLayers-2.11/examples/osm.html is
>> working as expected.
>>
>> If needed I can file an issue on github.
>>
>> Best regards,
>> Marc
>>
>>
>>
>>
>>
>> _______________________________________________
>> Dev mailing list
>> Dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
>>
>
>


-- 

   Dipl.-Geogr. Marc Jansen
   — Anwendungsentwickler —

   terrestris GmbH & Co. KG
   Pützchens Chaussee 56
   53227 Bonn

   Tel:   +49 (0)228 / 96 28 99 -53
   Fax:   +49 (0)228 / 96 28 99 -57

   Email: jansen at terrestris.de
   Web:   http://www.terrestris.de

   Amtsgericht Bonn, HRA 6835, Komplementärin: terrestris Verwaltungs-
   gesellschaft mbH, vertreten durch: Hinrich Paulsen, Till Adams



More information about the Dev mailing list