Ticket #3403 (closed bug: fixed)

Opened 23 months ago

Last modified 22 months ago

Popups Cannot Be Closed on Touch Based Interfaces

Reported by: mwootendev Owned by: euzuro
Priority: minor Milestone: 2.11 Release
Component: Popup Version: 2.11 RC1
Keywords: popup, touch, close Cc: xavier.mamano@…
State: Commit

Description

When using a touch based interface (iPhone, iPad, etc.), the map popups cannot be closed by clicking on the close icon. It appears that the close icon is not responding to "onclick" events that should be triggered by tapping.

Attachments

OpenLayers-3403-PopupClose.patch Download (0.6 KB) - added by mwootendev 23 months ago.
This patch adds a "touchend" event listener to catch taps on the close div.
3403.1.patch Download (2.1 KB) - added by jorix 22 months ago.
3403.2.patch Download (3.7 KB) - added by jorix 22 months ago.
This is the same patch "3403.1.patch" adding test the adjustments.
3403-typo.patch Download (452 bytes) - added by Manchito 22 months ago.
This patch fixes a typo on "3403.2.patch"
openlayers-3403.patch Download (1.2 KB) - added by ahocevar 22 months ago.
isn't this enough?

Change History

Changed 23 months ago by mwootendev

This patch adds a "touchend" event listener to catch taps on the close div.

follow-up: ↓ 3   Changed 22 months ago by Manchito

I can confirm. Neither the close icon nor the links within the HTML content work.

However, this patch didn't help me.

Using FramedCloud.

follow-up: ↓ 4   Changed 22 months ago by tpingenot

  • cc tpingenot added

I too am having the same problem, all html content such as forms, hyperlinks within a framed cloud popup in version 2.11 RC1 does not work on an IPad2.

Changed 22 months ago by jorix

in reply to: ↑ 1   Changed 22 months ago by jorix

Replying to Manchito:

I can confirm. Neither the close icon nor the links within the HTML content work. However, this patch didn't help me. Using FramedCloud.

I think attachment:3403.1.patch Download will solve the problem, I've tried it with Android X86.
Please, you can try if this solves your problem, thanks.

in reply to: ↑ 2   Changed 22 months ago by jorix

Replying to tpingenot:

I too am having the same problem, all html content such as forms, hyperlinks within a framed cloud popup in version 2.11 RC1 does not work on an IPad2.

Please, you can try if new patch solves your problem on IPad2, thanks.

Changed 22 months ago by jorix

This is the same patch "3403.1.patch" adding test the adjustments.

  Changed 22 months ago by jorix

  • cc xavier.mamano@… added

  Changed 22 months ago by tpingenot

  • cc tpingenot removed

This patch fixed the problem(s) for me. The framed cloud closes and the html content within responds. Thank you!

follow-up: ↓ 10   Changed 22 months ago by ahocevar

  • status changed from new to closed
  • resolution set to fixed

(In [12183]) Popups can now be cloused on touch devices. p=jorix (closes #3403)

  Changed 22 months ago by ahocevar

  • status changed from closed to reopened
  • state set to Pullup
  • resolution fixed deleted

  Changed 22 months ago by Manchito

Good! It works now. Tested on Android 2.1 and iPhone 4. :)

Changed 22 months ago by Manchito

This patch fixes a typo on "3403.2.patch"

in reply to: ↑ 7   Changed 22 months ago by jorix

  • state changed from Pullup to Review

Replying to ahocevar:

(In [12183]) Popups can now be cloused on touch devices. p=jorix (closes #3403)

oops! had a typo, sorry. Please also apply this fix 3403-typo.patch Download of Manchito.

Thank.

follow-ups: ↓ 13 ↓ 15   Changed 22 months ago by ahocevar

@jorix: if the fix works even with the typo, I'm asking myself: is the touchend handler really needed?

Changed 22 months ago by ahocevar

isn't this enough?

follow-up: ↓ 18   Changed 22 months ago by ahocevar

  • state changed from Review to Awaiting User Feedback

@Manchito, can you please test if it still works for you after applying openlayers-3403.patch Download?

in reply to: ↑ 11   Changed 22 months ago by jorix

Replying to ahocevar:

@jorix: if the fix works even with the typo, I'm asking myself: is the touchend handler really needed?

Later (I can not now) I thought to mount a Control.ModifyFeature and Popups ecenario and see if I can break the behavior using openlayers-3403.patch Download.

  Changed 22 months ago by tpingenot

@ahocevar

The popup still works correctly for me after applying your additional patch  http://trac.osgeo.org/openlayers/attachment/ticket/3403/openlayers-3403.patch

on the IPad 2.

I have noticed that when my html content is too big in the popup scrolling within the popup does not work on the IPad2, however I'm not sure if this is an OpenLayers bug or some other aspect of my site, JQuery, CSS, or simply an IPad browser limitation. Scrolling in subpanels/frames is already strange in an IPad by default because it requires two fingers moving in parallel. I do get scrolling in another part of the site on the IPad using the two finger method, but not in the popup. I'll keep investigating on my end.

in reply to: ↑ 11   Changed 22 months ago by jorix

Replying to ahocevar:

@jorix: if the fix works even with the typo, I'm asking myself: is the touchend handler really needed?

Yes, It seems that openlayers-3403.patch Download does not cause problems (tested using Android X86)

Forms work, and I could not break anything (I have not managed to find a control or handler who uses "touchmove" or "touchend" without being subject to "touchstart")

Effective and simple! :-)

  Changed 22 months ago by ahocevar

  • state changed from Awaiting User Feedback to Commit

follow-up: ↓ 20   Changed 22 months ago by ahocevar

  • status changed from reopened to closed
  • resolution set to fixed

(In [12190]) Removing unnecessary handlers introduced in r12183 (closes #3403)

in reply to: ↑ 12   Changed 22 months ago by Manchito

Replying to ahocevar:

@Manchito, can you please test if it still works for you after applying openlayers-3403.patch Download?

Sorry for the late reply. Yes, it still works. But is that a good idea? Doesn't it make impossible to handle move events within the popup? One may eventually want to use touchmove in such a case. And the fact that there is no current control or handler making use of it doesn't mean that there couldn't be one in the future.

  Changed 22 months ago by ahocevar

@Manchito: can you please open a separate ticket for this concern?

in reply to: ↑ 17   Changed 22 months ago by jorix

Replying to ahocevar:

(In [12190]) Removing unnecessary handlers introduced in r12183 (closes #3403)

Question: This ticket should be open and Pullup state?

... and also:  http://trac.osgeo.org/openlayers/query?status=closed&version=2.11+RC1&milestone=2.11+Release&resolution=fixed ?

Note: See TracTickets for help on using tickets.