Remove the tabindex the google maps in my page

前端 未结 3 1075
日久生厌
日久生厌 2021-01-21 01:38

I need to remove the tabindex the map on my page. I used the code below but the tab passes through the markers on the map and the Google logo.

var map = new goog         


        
3条回答
  •  既然无缘
    2021-01-21 02:03

    Building off Vasil's answer

    google.maps.event.addListener(MAP, "tilesloaded", function(){
        [].slice.apply(document.querySelectorAll('#map a')).forEach(function(item) {
            item.setAttribute('tabindex','-1');
        });
    })
    

    Here is it in action.

提交回复
热议问题