Found the culprit.
webview.freeMemory()
I was calling this function to release memory on every tab change. Commenting this code fixed the issue. I am not sure for the reason behind this but the Webview goes into some processing state for long time and does not take UI clicks.