Popup blocker did not block popup for me when I trigger popup a second time |
|||
Issue descriptionChrome Version (from the about:version page): 50.0.2661.75 (64-bit) Is this the most recent version: Yes OS + version: Goobuntu as of 4/15 CPU architecture (32-bit / 64-bit): 64bit Window manager: Cinnamon URLs (if relevant): In development code (will explain) Behavior in Linux Firefox: Defeated popup blocker Behavior in Windows Chrome (if you have access to it): Not tested What steps will reproduce the problem? Here is the code: (cl/119970475) PopupBlockerCheckController.prototype.validatePopUpBlocker = function() { // Open the smallest window possible. let popupWindow = goog.window.open('about:blank', { target: 'popupTest', width: 0, height: 0, top: 0, left: 0, toolbar: false, location: false, statusbar: false, menubar: false }); if (!popupWindow || popupWindow.closed) { // popup blocked this.runningMessage_.setStyle('display', 'none'); this.failedMessage_.setStyle('display', 'block'); this.passedMessage_.setStyle('display', 'none'); } else { // popup opened popupWindow.close(); this.runningMessage_.setStyle('display', 'none'); this.failedMessage_.setStyle('display', 'none'); this.passedMessage_.setStyle('display', 'block'); } }; We have this code to test if the popup blocker is on, and inform our user that they need to turn it of for this ads review tool (because we pop up ad landing pages). (0) Popup blocker is on (1) When this code trigger for the first time, this works great. (2) Then our failed message show up. (3) I clicked a button to trigger this code a second time. (4) The popup blocked did not block the popup, and the test passed. (I put a break point and confirmed that the popup come up. What is the expected result? No matter how many times this is fired, it should continue blocking popup. What happens instead? I defeated the popup blocker. screencast: https://screencast.googleplex.com/cast/5670568615477248
,
May 12 2016
https://jsfiddle.net/n79pe7d3/ Step to reproduce: 0) Popup blocker blocked a popup for google.com. 1) Click "click me" 2) Popup blocker did not block popup.
,
May 13 2016
Thank you for providing more feedback. Adding requester "ajha@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
May 13 2016
that's how the popup blocker works - in response to a click, it's ok to open exactly one popup
,
May 16 2016
Closing the issue as WAI as per C#4. |
|||
►
Sign in to add a comment |
|||
Comment 1 by ajha@chromium.org
, May 5 2016Components: UI>Browser>PopupBlocker
Labels: Needs-Feedback