Bug 1194503 - make appendNotification not set accesskey="undefined" if passed a structure with no accesskey, r=gijs
authorYFdyh000 <yfdyh000@gmail.com>
Thu, 13 Aug 2015 21:38:00 +0100
changeset 290397 bd5b01dfe7d79cc45e0f41e5edcf08b91444e714
parent 290396 66d1159b02a6bdf908b8818b2bbc800c258626b9
child 290398 beb9cc29efb9f727d22f179bcf551ca0bcb842ef
child 290465 9fc432621b17fe4853323927d211b6928497ae97
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgijs
bugs1194503
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1194503 - make appendNotification not set accesskey="undefined" if passed a structure with no accesskey, r=gijs
toolkit/content/widgets/notification.xml
--- a/toolkit/content/widgets/notification.xml
+++ b/toolkit/content/widgets/notification.xml
@@ -117,17 +117,18 @@
               // added to the first button (unless that button has isDefault
               // set to false). There cannot be multiple default buttons.
               var defaultElem;
 
               for (var b = 0; b < aButtons.length; b++) {
                 var button = aButtons[b];
                 var buttonElem = document.createElementNS(XULNS, "button");
                 buttonElem.setAttribute("label", button.label);
-                buttonElem.setAttribute("accesskey", button.accessKey);
+                if (typeof button.accessKey == "string")
+                  buttonElem.setAttribute("accesskey", button.accessKey);
                 if (typeof button.type == "string") {
                   buttonElem.setAttribute("type", button.type);
                   if ((button.type == "menu-button" || button.type == "menu") &&
                       "popup" in button) {
                     buttonElem.appendChild(button.popup);
                     delete button.popup;
                   }
                   if (typeof button.anchor == "string")