Skip to content

Commit

Permalink
Electron: Fixes #84: Fields losing focus in Config screen
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent22 committed Nov 8, 2017
1 parent 0f343bc commit b9194e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ElectronClient/app/gui/ConfigScreen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ConfigScreenComponent extends React.Component {
}

return (
<div key={key+value} style={rowStyle}>
<div key={key} style={rowStyle}>
<div style={labelStyle}><label>{md.label()}</label></div>
<select value={value} style={controlStyle} onChange={(event) => { updateSettingValue(key, event.target.value) }}>
{items}
Expand All @@ -72,9 +72,9 @@ class ConfigScreenComponent extends React.Component {
}

return (
<div key={key+value} style={rowStyle}>
<div key={key} style={rowStyle}>
<div style={controlStyle}>
<input id={'setting_checkbox_' + key} type="checkbox" defaultChecked={!!value} onChange={(event) => { onCheckboxClick(event) }}/><label onClick={(event) => { onCheckboxClick(event) }} style={labelStyle} htmlFor={'setting_checkbox_' + key}>{md.label()}</label>
<input id={'setting_checkbox_' + key} type="checkbox" checked={!!value} onChange={(event) => { onCheckboxClick(event) }}/><label onClick={(event) => { onCheckboxClick(event) }} style={labelStyle} htmlFor={'setting_checkbox_' + key}>{md.label()}</label>
</div>
</div>
);
Expand All @@ -86,7 +86,7 @@ class ConfigScreenComponent extends React.Component {
}

return (
<div key={key+value} style={rowStyle}>
<div key={key} style={rowStyle}>
<div style={labelStyle}><label>{md.label()}</label></div>
<input type="text" style={controlStyle} value={this.state.settings[key]} onChange={(event) => {onTextChange(event)}} />
</div>
Expand Down

0 comments on commit b9194e9

Please sign in to comment.