简体   繁体   中英

Android Browser Button Click Issue

I have been trying to research this problem all day and have come up with nothing so far so I apologize if I am making a duplicate post. I am a little unsure of how exactly to word the problem for search engines.

My problem is: I am working on a website that's mobile devices. In the website there are buttons that when clicked highlight a certain colour while it's loading the new page. I do this with both links (styled to look like buttons) and buttons (html tag buttons). I simply add a css class to the button/link using JavaScript that sets the background colour to the button. Now this works on Chrome on and all iOS devices.

The problem arises on Android devices. All "link buttons" work fine but html tag buttons do not highlight. For some reason, there are two that actually work but none others will. From what I understand, the Android browser will start loading the new content without refreshing the current page with the new css. This makes the page look frozen while it loads and stops any highlights from happening. This also effects a loading effect I bring up after clicking a certain button.

I'm looking for any information anyone might have on this problem or any way I can search for a solution. I've been trying to come up with creative solutions to get around the problem or find out why two buttons are highlighting and the others are not but it has been a long road. Any help would be much appreciated.

Thanks,

Kyle

尝试

webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM