Bug 803847 Block script from seeing clicks on the plugin placeholders r/a=IanN
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Tue, 23 Oct 2012 23:16:12 +0100
changeset 13495 4b325b90838c5d77cac0ee8cb85c76b48ffdecd5
parent 13494 ec317af35d4247206ccb1dd3e36418b5fbb4f826
child 13496 afcebf68edf6b6ed9584b51c320ed65eade8694e
push idunknown
push userunknown
push dateunknown
bugs803847
Bug 803847 Block script from seeing clicks on the plugin placeholders r/a=IanN
suite/common/bindings/notification.xml
--- a/suite/common/bindings/notification.xml
+++ b/suite/common/bindings/notification.xml
@@ -556,29 +556,31 @@
           <![CDATA[
             // XXX just doing (callback)(arg) was giving a same-origin error. bug?
             let callbackArgs = Array.slice(arguments, 2);
             linkNode.addEventListener("click",
                                       function(aEvent) {
                                         if (!aEvent.isTrusted)
                                           return;
                                         aEvent.preventDefault();
+                                        aEvent.stopPropagation();
                                         if (callbackArgs.length == 0)
                                           callbackArgs = [ aEvent ];
                                         callback.apply(this, callbackArgs);
                                       }.bind(this),
                                       true);
 
             linkNode.addEventListener("keydown",
                                       function(aEvent) {
                                         if (!aEvent.isTrusted)
                                           return;
                                         if (aEvent.keyCode == aEvent.DOM_VK_RETURN)
                                           return;
                                         aEvent.preventDefault();
+                                        aEvent.stopPropagation();
                                         if (callbackArgs.length == 0)
                                           callbackArgs = [ aEvent ];
                                         callback.apply(this, callbackArgs);
                                       }.bind(this),
                                       true);
           ]]>
         </body>
       </method>