mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-02-16 23:53:52 -05:00
Remove workaround for fixed bug in SettingToggle
SettingToggle was toggling itself in response to keydown of space, and then the keyup was doing it again
This commit is contained in:
parent
6ba67f92c9
commit
4aa8d9d149
@ -18,12 +18,6 @@ export default class SettingToggle extends React.PureComponent {
|
|||||||
this.props.onChange(this.props.settingKey, target.checked);
|
this.props.onChange(this.props.settingKey, target.checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
onKeyDown = e => {
|
|
||||||
if (e.key === ' ') {
|
|
||||||
this.props.onChange(this.props.settingKey, !e.target.checked);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { prefix, settings, settingKey, label, meta } = this.props;
|
const { prefix, settings, settingKey, label, meta } = this.props;
|
||||||
const id = ['setting-toggle', prefix, ...settingKey].filter(Boolean).join('-');
|
const id = ['setting-toggle', prefix, ...settingKey].filter(Boolean).join('-');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user