1

On a webpage i have a google map that should be draggable. But when dragging the Google Map (is the official web component), Safari drags the whole website (like when dragging an image).

Firefox and Chrome work great (IE not tested). Any ideas?

MacBook Pro and Safari 7 and 8 where tested.

Would be awesome to hear some ideas.

lukaswelte
  • 2,951
  • 1
  • 23
  • 45
  • I believe this is some kind of "feature" of that browser. I'd love to be proven wrong though. My users hate that. – DarthDerrr Jul 14 '15 at 12:03
  • Do you know any work around on that thing, DarthDerrr? On some pages like google maps itself it works.. Cannot determine the difference right now – lukaswelte Jul 14 '15 at 12:33
  • Come to think of it, there were some ways that were unacceptable for my site. I think one was styling the body with overflow: hidden; Of course, then the page isn't scrollable. – DarthDerrr Jul 14 '15 at 12:46
  • In the referenced website, the map is part of the site, so disabling scroll is no option.. – lukaswelte Jul 14 '15 at 12:47

1 Answers1

2

The drag of the window can be disabled via:

window.ondragstart = function() { return false; } 

This solves the issue (although of course the dragging functionality that causes this bug is then disabled)

lukaswelte
  • 2,951
  • 1
  • 23
  • 45