Skip to content

Commit

Permalink
Add label-checkbox relation in CreateLink form #1275
Browse files Browse the repository at this point in the history
Added id to anchor target checkbox using this.getEditorId() for
uniqueness, and then added the for attribute to the label
  • Loading branch information
jamenamcinteer committed Jun 22, 2017
1 parent 2fc300c commit 441766c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/extensions/anchor.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@
// figure out how to deprecate? also consider `fa-` icon default implcations.
template.push(
'<div class="medium-editor-toolbar-form-row">',
'<input type="checkbox" class="medium-editor-toolbar-anchor-target">',
'<label>',
'<input type="checkbox" class="medium-editor-toolbar-anchor-target" id="medium-editor-toolbar-anchor-target-field-' + this.getEditorId() + '">',
'<label for="medium-editor-toolbar-anchor-target-field-' + this.getEditorId() + '">',
this.targetCheckboxText,
'</label>',
'</div>'
Expand Down

0 comments on commit 441766c

Please sign in to comment.