зеркало из https://github.com/mozilla/gecko-dev.git
Bug 260527. Some radio buttons not underlining accesskeys in labels. Relanding toolkit part of patch following aviary branch landing - previously reviewed
This commit is contained in:
Родитель
eddbb28d7e
Коммит
d4e201c3e8
|
@ -26,13 +26,13 @@
|
|||
</getter>
|
||||
<setter>
|
||||
<![CDATA[
|
||||
// If there is a label, store the accesskey on the labelElement
|
||||
// Always store on the control
|
||||
this.setAttribute('accesskey', val);
|
||||
// If there is a label, change the accesskey on the labelElement
|
||||
// if it's also set there
|
||||
if (this.labelElement) {
|
||||
this.labelElement.accessKey = val;
|
||||
}
|
||||
else {
|
||||
this.setAttribute('accesskey', val);
|
||||
}
|
||||
return val;
|
||||
]]>
|
||||
</setter>
|
||||
|
|
|
@ -138,24 +138,27 @@
|
|||
<property name="accessKey">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
var accessKey = this.getAttribute('accesskey');
|
||||
var accessKey;
|
||||
var labeledEl = this.labeledControlElement;
|
||||
if (labeledEl) {
|
||||
accessKey = labeledEl.getAttribute('accesskey');
|
||||
}
|
||||
if (!accessKey) {
|
||||
var labeledEl = this.labeledControlElement;
|
||||
if (labeledEl) {
|
||||
accessKey = labeledEl.getAttribute('accesskey');
|
||||
}
|
||||
accessKey = this.getAttribute('accesskey');
|
||||
}
|
||||
return accessKey ? accessKey[0] : null;
|
||||
]]>
|
||||
</getter>
|
||||
<setter>
|
||||
<![CDATA[
|
||||
// If the control already has an accesskey store it there as well
|
||||
// If this label already has an accesskey attribute store it here as well
|
||||
if (this.hasAttribute('accesskey')) {
|
||||
this.setAttribute('accesskey', val);
|
||||
}
|
||||
var control = this.labeledControlElement;
|
||||
if (control && control.hasAttribute('accesskey')) {
|
||||
if (control) {
|
||||
control.setAttribute('accesskey', val);
|
||||
}
|
||||
this.setAttribute('accesskey', val);
|
||||
this.formatAccessKey();
|
||||
return val;
|
||||
]]>
|
||||
|
|
Загрузка…
Ссылка в новой задаче