mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-02 05:01:38 +02:00
Remove sidebar key trap (close #7770)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user