Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent Google Chrome suppressing dialogs?

How can I prevent Chrome console giving the following error when I try to use the prompt() command?

A window.prompt() dialog generated by this page was suppressed because this page is not the active tab of the front window. Please make sure your dialogs are triggered by user interactions to avoid this situation. https://www.chromestatus.com/feature/5637107137642496

Up until 2-3 days ago the prompt() command worked fine and would open a dialog where I could input data, now it always gives me this error even if I am definitely on the active tab. I have checked chrome content settings and allow popups is checked.

Thanks!

like image 909
Gulli Avatar asked May 10 '17 20:05

Gulli


2 Answers

The buggy behaviour here is because, when debugging using the developer tools, the developer tools window is actually the active one. A workaround is to use the play or step buttons that render over the tab that is actually being debugged, as shown below.

enter image description here

like image 170
David Avatar answered Nov 08 '22 01:11

David


You have to dock the developer window in the same window. Don't undock into a separate window. This helped me. EDIT: Screenshot In Undocked mode That is no active window attached. And when It is docked to left || right || down the window It works Properly

like image 29
Abdullah Noman Avatar answered Nov 08 '22 00:11

Abdullah Noman