codeforeauclaire / foodtrucks

3 stars 6 forks source link

[Consumer] Can't view an event in mobile. #104

Open aaronsalmon opened 8 years ago

aaronsalmon commented 8 years ago

when on your phone:

  1. navigate to a date that has an event pin
  2. click the pin to open the popup.

the popup flashes open for a moment and closes/disappears.

aaronsalmon commented 8 years ago

this is the highest priority issue I found so far. currently unusable on a phone.

AnthonyAstige commented 8 years ago

Reproducible on desktop by making a very short browser window. Roughly speaking it looks like if the title + image don't fit on screen, the popup auto-closes.

levifelling commented 8 years ago

From what I can tell the marker click event attempts to pan the map such that the popup is visible, but because the popup window is too large to fit on the screen it pans the marker off the visible map, which is triggering the close popup event.

options:

  1. switch from popup to modal dialog (fixed size & location)
  2. fix popup size, add inner scrollbars for overflow content

other ideas?

AnthonyAstige commented 8 years ago

@levifelling Ah good explanation, that sounds very likely the cause

option (I'm not sure if this is easily possible):

  1. Make auto closing trigger less aggressive (it appears the pin can be off the map a little before closing already, but we need it further).

option (Though I think bad):

  1. Disable auto-pan
levifelling commented 8 years ago

added maxHeight constraint to popup https://github.com/codeforeauclaire/foodtrucks/commit/22cda99299b57a0019325e5af245805263ca30dc

AnthonyAstige commented 8 years ago

RE - 22cda99

  1. Edge case: when resizing the browser window from large to small, original bug still appears (as height is only calculated at start)
  2. Math of screen size / 3 is a bit oversimplistic not using all available space (see screenshot below)

screenshot from 2016-07-01 16-35-09