-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot click & drag the map in desktop Safari #88
Comments
Hmm that's frustrating. I would be curious to see if the "click to focus" is causing this or not. It should be easy enough to test:
@paul121 if you have a chance can you try that and see if it makes any difference? |
Found this: https://stackoverflow.com/questions/42758815/safari-focus-event-doesnt-work-on-button-element It doesn't describe this issue exactly, but it does suggest that Safari's rules about what creates "focus" are different, which could be a clue. One of the solutions/suggestions in there is to listen for a click event on the element and trigger focus on it via JS. Not sure if that would help here... Maybe clicking on the map is giving focus to SOME element (hence why you are seeing "highlighted a light blue after clicking"), but maybe it's not the RIGHT element... ? |
Found the issue! OL v6.4.0 release notes:
For reference, the polyfill was removed with openlayers/openlayers#11173 Simple fix is re-adding the @mstenta I tried all of your steps above and the map wasn't working at step 2. None of the custom edit controls were working either (edit & snapping controls). But the latest OL drag example was working in Safari... then I noticed all of their examples have this in their HTML:
Seems weird they would remove the dependency when it is largely needed, but looks like the removal may have been motivated by a licensing issue: openlayers/openlayers#11138 It doesn't seem like this would affect farmOS, but perhaps it would affect anyone who bundles the farmOS-map library (not sure if that is the case right now anyways) but might be worth including in the docs? Or maybe we should consider using |
This link lays out the effected browsers pretty well: https://caniuse.com/#feat=pointer The date relative view is handy. That shows Firefox & Chrome have been supported since 2018 and Safari halfway through 2019. Notably, the latest Firefox on Android seems like it still isn't supported. |
Thanks for digging into this @paul121 !
I'd like to understand this a bit better before we proceed. I don't know enough about the MPL to understand what is/isn't allowed. According to Wikipedia:
https://en.wikipedia.org/wiki/License_compatibility#Compatibility_of_FOSS_licenses The other consideration we have is drupal.org packaging license requirements. See https://www.drupal.org/docs/develop/packaging-a-distribution/drupalorg-distribution-packaging-requirements Worth noting, we are considering moving off of drupal.org for farmOS 2.x packaging, but 7.x-1.x will continue to be packaged on drupal.org, so we are bound by their license requirements. On a related note, I just opened #90 to consider changing the farmOS-map license to MIT. So I think the questions are:
Obligatory "I am not a lawyer." :-) |
From that link (openlayers/openlayers#11138):
I'm also wary of introducing something that is already a problem for someone else. :-/ |
Seems like there are lots of other options out there for pointer event polyfills, no? |
All good things to consider. Another option may be to use the Hopefully we could selectively import from that library to avoid a much larger file size? |
@jgaehring I'm only aware of these two because they were mentioned in the OL issues - but if there are other options we should definitely consider them! |
I'm also curious about this "foss compliance tool" now. I wonder if it would find anything else we are already doing. (Just a curiosity - not blocker for this) |
@Vital-Agronomics noticed we can't click & drag navigate the map in Desktop safari. I was able to recreate on my Mac laptop.
We can click on the map controls (zoom in/zoom out, layer control, etc) but cannot click and drag the map around. We've tried mouse and trackpad. Also are aware that we need to "click" on the map before dragging. The map container is highlighted a light blue after clicking. Nothing is displayed in the console.
Unfortunately both our laptops are fairly old and not sure if we can even upgrade to the latest version of Safari/Mac OS. But here are versions we have tested.
I might have access to a newer Mac I could test this on.. but a client we are working with has older macbooks on the farm, so hopefully upgrading isn't the only solution. Haven't a chance to test much further, just wanted to create the issue now!
The text was updated successfully, but these errors were encountered: