Bug 1325570 - The checkboxes from modal can now be checked/unchecked using the left click only; r=jryans

MozReview-Commit-ID: LPRzXjp7q6v

--HG--
extra : rebase_source : 198f3bec99e8a026cbef2f0103b40d1c1e2b53c2
This commit is contained in:
Towkir Ahmed 2017-01-04 09:34:37 -06:00
parent a45c16df23
commit 5fb25d056e

View File

@ -49,7 +49,10 @@ module.exports = createClass({
window.removeEventListener("keydown", this.onKeyDown, true);
},
onDeviceCheckboxClick({ target }) {
onDeviceCheckboxChange({ nativeEvent: { button }, target }) {
if (button !== 0) {
return;
}
this.setState({
[target.value]: !this.state[target.value]
});
@ -154,7 +157,7 @@ module.exports = createClass({
type: "checkbox",
value: device.name,
checked: this.state[device.name],
onChange: this.onDeviceCheckboxClick,
onChange: this.onDeviceCheckboxChange,
}),
device.name
);