Home Forums Feature Requests Disable scroll wheel on Google Maps field in admin


Disable scroll wheel on Google Maps field in admin

  • This has been an issue for clients, coworkers and me for a long time. Any time you scroll the edit screen and encounter the Google Maps field scrolling will stop and the map will zoom out (or in if you are scrolling up).

    The Google Maps API has a setting which disables zooming by the scroll wheel. For the sites we build, we disable the zoom by scroll wheel as it is more of an annoyance to keep it enabled.

  • I’ll mark this for the developer’s attention.

  • You can do this using the PHP acf/admin/input_head action to write JavaScript that uses the google_maps_args ACF JavaScript filter.

    add_action( 'acf/input/admin_head', function(){
    	<script type="text/javascript">
    		acf.add_filter( 'google_map_args', function( options, $field ){
    			return $.extend({scrollwheel: false}, options);
    		} )
  • Thanks for the info @jsilver I’m sure it wil be useful.

  • The scroll-wheel zooming can be disabled in the plugin, which we recently released ACF Google Map Extended.

    It extends ACF Google Map field functionality with some useful features and backward compatible with the data format of the original field.

    Best wishes,
    CodeFish team

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Disable scroll wheel on Google Maps field in admin’ is closed to new replies.