adds openOnClick popup option

For #3058 
can be simplified to just `if (options.openOnClick !== false)`