Bug 980943 - Do not reshow the overlay when the user clicks on the overlay if it is already not visibile. r=mconley

This commit is contained in:
Trevor Rowbotham 2015-07-08 12:45:00 +02:00
parent 8b8c872220
commit f22d6c3c6e

View File

@ -623,10 +623,13 @@ PluginContent.prototype = {
let plugin = document.getBindingParent(event.target);
let contentWindow = plugin.ownerDocument.defaultView.top;
let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
let overlay = this.getPluginUI(plugin, "main");
// Have to check that the target is not the link to update the plugin
if (!(event.originalTarget instanceof contentWindow.HTMLAnchorElement) &&
(event.originalTarget.getAttribute('anonid') != 'closeIcon') &&
event.button == 0 && event.isTrusted) {
overlay.classList.contains('visible') &&
event.button == 0 &&
event.isTrusted) {
this._showClickToPlayNotification(plugin, true);
event.stopPropagation();
event.preventDefault();