Bug 488821 - rememberChoice checkboxes conflict in two tabs with geolocation notifications. r=dougt/gavin

This commit is contained in:
Myk Melez 2009-04-17 09:27:26 -07:00
parent 9cbbaf5999
commit a9fc30c50d

View File

@ -1082,7 +1082,7 @@ GeolocationPrompt.prototype = {
label: browserBundle.GetStringFromName("geolocation.tellThem"),
accessKey: browserBundle.GetStringFromName("geolocation.tellThemKey"),
callback: function(notification) {
if (notification.ownerDocument.getElementById("rememberChoice").checked)
if (notification.getElementsByClassName("rememberChoice")[0].checked)
setPagePermission(request.requestingURI, true);
request.allow();
},
@ -1091,9 +1091,9 @@ GeolocationPrompt.prototype = {
label: browserBundle.GetStringFromName("geolocation.dontTellThem"),
accessKey: browserBundle.GetStringFromName("geolocation.dontTellThemKey"),
callback: function(notification) {
if (notification.ownerDocument.getElementById("rememberChoice").checked)
if (notification.getElementsByClassName("rememberChoice")[0].checked)
setPagePermission(request.requestingURI, false);
request.cancel()
request.cancel();
},
}];
@ -1113,7 +1113,7 @@ GeolocationPrompt.prototype = {
function geolocation_hacks_to_notification () {
var checkbox = newBar.ownerDocument.createElementNS(XULNS, "checkbox");
checkbox.setAttribute("id", "rememberChoice");
checkbox.className = "rememberChoice";
checkbox.setAttribute("label", "Remember for this site"); /* xxx hardcoded english us */
newBar.appendChild(checkbox);