mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-16 05:49:16 +02:00
Standardize return key comments
This commit is contained in:
@@ -89,7 +89,9 @@ export function uiFeatureList(context) {
|
||||
function keypress() {
|
||||
var q = search.property('value'),
|
||||
items = list.selectAll('.feature-list-item');
|
||||
if (d3_event.keyCode === 13 && q.length && items.size()) { // return
|
||||
if (d3_event.keyCode === 13 && // ↩ Return
|
||||
q.length &&
|
||||
items.size()) {
|
||||
click(items.datum());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +177,8 @@ export function uiNoteEditor(context) {
|
||||
|
||||
// fast submit if user presses cmd+enter
|
||||
function keydown() {
|
||||
if (!(d3_event.keyCode === 13 && d3_event.metaKey)) return;
|
||||
if (!(d3_event.keyCode === 13 && // ↩ Return
|
||||
d3_event.metaKey)) return;
|
||||
|
||||
var osm = services.osm;
|
||||
if (!osm) return;
|
||||
|
||||
@@ -85,7 +85,8 @@ export function uiPresetList(context) {
|
||||
function keypress() {
|
||||
// enter
|
||||
var value = search.property('value');
|
||||
if (d3_event.keyCode === 13 && value.length) {
|
||||
if (d3_event.keyCode === 13 && // ↩ Return
|
||||
value.length) {
|
||||
list.selectAll('.preset-list-item:first-child')
|
||||
.each(function(d) { d.choose.call(this); });
|
||||
}
|
||||
|
||||
@@ -127,7 +127,9 @@ export function uiSectionPresetFields(context) {
|
||||
selection.selectAll('.wrap-form-field input')
|
||||
.on('keydown', function() {
|
||||
// if user presses enter, and combobox is not active, accept edits..
|
||||
if (d3_event.keyCode === 13 && context.container().select('.combobox').empty()) {
|
||||
if (d3_event.keyCode === 13 && // ↩ Return
|
||||
context.container().select('.combobox').empty()) {
|
||||
|
||||
context.enter(modeBrowse(context));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -144,7 +144,7 @@ export function uiSectionValidationRules(context) {
|
||||
this.select();
|
||||
})
|
||||
.on('keyup', function () {
|
||||
if (d3_event.keyCode === 13) { // enter
|
||||
if (d3_event.keyCode === 13) { // ↩ Return
|
||||
this.blur();
|
||||
this.select();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user