Skip to content

Commit

Permalink
Remove sidebar key trap (close #7770)
Browse files Browse the repository at this point in the history
  • Loading branch information
quincylvania committed Sep 11, 2020
1 parent 546de3d commit e0b8170
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
9 changes: 0 additions & 9 deletions css/80_app.css
Original file line number Diff line number Diff line change
Expand Up @@ -2634,15 +2634,6 @@ img.tag-reference-wiki-image {
*/
}

/* hidden field to prevent user from tabbing out of the sidebar */
input.key-trap {
height: 0px;
width: 0px;
padding: 0px;
border: 1px solid rgba(0,0,0,0);
}


/* add tag, add relation buttons */
.add-row {
display: flex;
Expand Down
18 changes: 0 additions & 18 deletions modules/ui/entity_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,24 +112,6 @@ export function uiEntityEditor(context) {
body.call(section.render);
});

body
.selectAll('.key-trap-wrap')
.data([0])
.enter()
.append('div')
.attr('class', 'key-trap-wrap')
.append('input')
.attr('type', 'text')
.attr('class', 'key-trap')
.on('keydown.key-trap', function() {
// On tabbing, send focus back to the first field on the inspector-body
// (probably the `name` field) #4159
if (d3_event.keyCode === 9 && !d3_event.shiftKey) {
d3_event.preventDefault();
body.select('input').node().focus();
}
});

context.history()
.on('change.entity-editor', historyChanged);

Expand Down

0 comments on commit e0b8170

Please sign in to comment.