Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.on('keydown', function() {
// if user presses enter, and combobox is not active, accept edits..
if (d3_event.keyCode === 13 && d3_select('.combobox').empty()) {
context.enter(modeBrowse(context));
}
});
}
function keydown() {
if (!(d3_event.keyCode === 13 && d3_event.metaKey)) return;
var osm = services.osm;
if (!osm) return;
var hasAuth = osm.authenticated();
if (!hasAuth) return;
if (!_note.newComment) return;
d3_event.preventDefault();
d3_select(this)
.on('keydown.note-input', null);
// focus on button and submit
window.setTimeout(function() {
function keydown() {
var shown = !container.selectAll('.combobox').empty();
var tagName = input.node() ? input.node().tagName.toLowerCase() : '';
switch (d3_event.keyCode) {
case 8: // ⌫ Backspace
case 46: // ⌦ Delete
d3_event.stopPropagation();
_selected = null;
render();
input.on('input.combo-input', function() {
var start = input.property('selectionStart');
input.node().setSelectionRange(start, start);
input.on('input.combo-input', change);
});
break;
case 9: // ⇥ Tab
accept();
break;
function keydown() {
if (d3_event.keyCode === 27) { // escape
search.node().blur();
}
}
function pushMore() {
if (d3_event.keyCode === 9 && !d3_event.shiftKey &&
list.selectAll('li:last-child input.value').node() === this) {
addTag();
}
}
select(document).on(`keydown.${id}`, () => {
const {active, results} = this.state;
const key = event.keyCode;
const DOWN = 40,
ENTER = 13,
ESC = 27,
S = 83,
UP = 38;
if (primary && !active && key === S && !["input", "textarea"].includes(event.target.tagName.toLowerCase()) && !event.target.className.includes("ql-editor")) {
event.preventDefault();
this.onToggle.bind(this)();
}
else if (active && key === ESC && event.target === this.input) {
event.preventDefault();
this.onToggle.bind(this)();
}
else if (active && event.target === this.input) {
select(document).on(`keydown.${id}`, () => {
const {router} = this.context;
const {active, results} = this.state;
const key = event.keyCode;
const DOWN = 40,
ENTER = 13,
ESC = 27,
S = 83,
UP = 38;
if (primary && !active && key === S && !["input", "textarea"].includes(event.target.tagName.toLowerCase()) && !event.target.className.includes("ql-editor")) {
event.preventDefault();
this.onToggle.bind(this)();
}
else if (active && key === ESC && event.target === this.input) {
event.preventDefault();
this.onToggle.bind(this)();
}
else if (active && event.target === this.input) {
function keypress() {
if (d3_event.keyCode === utilKeybinding.keyCodes.enter) {
popover.selectAll('.list .list-item.focused button.choose')
.each(function(d) { d.choose.call(this); });
d3_event.preventDefault();
d3_event.stopPropagation();
}
}
function keydown() {
if (_altDisables && d3_event.keyCode === utilKeybinding.modifierCodes.alt) {
_selection.selectAll('.hover')
.classed('hover-suppressed', true)
.classed('hover', false);
_selection
.classed('hover-disabled', true);
dispatch.call('hover', this, null);
}
}
function keydown() {
if (d3_event.keyCode === d3_keybinding.modifierCodes.alt) {
if (context.surface().classed('nope')) {
context.surface()
.classed('nope-suppressed', true);
}
context.surface()
.classed('nope', false)
.classed('nope-disabled', true);
}
}