Skip to content

Commit

Permalink
Make notification checkbox label clickable
Browse files Browse the repository at this point in the history
Fix brave#1590

Auditors: @bbondy
  • Loading branch information
diracdeltas committed May 6, 2016
1 parent 571d781 commit 3fb907a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion js/components/notificationBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class NotificationItem extends ImmutableComponent {
ipc.emit(messages.SHORTCUT_NEW_FRAME, {}, this.props.detail.get('options').get('advancedLink'))
}

toggleCheckbox () {
this.checkbox.checked = !this.checkbox.checked
}

render () {
let i = 0
const options = this.props.detail.get('options')
Expand All @@ -33,7 +37,10 @@ class NotificationItem extends ImmutableComponent {
<span className='notificationOptions'>
{
options.get('persist')
? <span><input type='checkbox' ref={(node) => { this.checkbox = node }} /><label data-l10n-id='rememberDecision' /></span>
? <span>
<input type='checkbox' ref={(node) => { this.checkbox = node }} />
<label data-l10n-id='rememberDecision' onClick={this.toggleCheckbox.bind(this)} />
</span>
: null
}
{
Expand Down
1 change: 1 addition & 0 deletions less/notificationBar.less
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
font-size: 15px;
padding: 0 10px 0 0;
color: #666;
cursor: pointer;
}
input[type="checkbox"] {
margin: 0 3px;
Expand Down

0 comments on commit 3fb907a

Please sign in to comment.