From 331174029be281caed741c5fb764f870ca328927 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 15 Aug 2013 12:44:24 -0700 Subject: [PATCH] Don't actually use a form element for the preset form Form elements have default behavior that we don't want, such as auto-clicking the first button when pressing return in a text field. Fixes #1681 --- css/app.css | 2 +- js/id/ui/preset.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/css/app.css b/css/app.css index fd4381efb..91e87dccd 100644 --- a/css/app.css +++ b/css/app.css @@ -959,7 +959,7 @@ a:hover .icon.out-link { background-position: -500px -14px;} overflow: hidden; } -.inspector-preset form.preset-form { +.inspector-preset .preset-form { padding: 10px; margin: 0 10px 20px 10px; border-radius: 8px; diff --git a/js/id/ui/preset.js b/js/id/ui/preset.js index 57b9daddb..894b7e12c 100644 --- a/js/id/ui/preset.js +++ b/js/id/ui/preset.js @@ -72,10 +72,10 @@ iD.ui.preset = function(context) { var shown = fields.filter(function(field) { return field.shown(); }), notShown = fields.filter(function(field) { return !field.shown(); }); - var $form = selection.selectAll('form') + var $form = selection.selectAll('.preset-form') .data([0]); - $form.enter().append('form') + $form.enter().append('div') .attr('class', 'preset-form inspector-inner fillL3'); var $fields = $form.selectAll('.form-field')