This behavior has been reported in several tickets: "Popup Dialogs from a Web application are identified as WinObject in Chrome. It works fine in Internet Explorer (IE) or Firefox (FF)".
Note: the sample above was taken from the following link to reproduce the issue http://www.w3schools.com/js/tryit.asp?filename=tryjs_alert
This is a known issue and below article has been created, it contains Enhancement Request to fix the limitation and workarounds. I recommend you subscribe to the email notification to get an update about the actual status.
Hope this helps.
HP | Unified Functional Testing Engineer