Browse Source

Form: fixes issues with ctrl + enter triggering form submit

Former-commit-id: f8b1e1da2f
Former-commit-id: 383b523780
pull/258/head
jlukic 11 years ago
parent
commit
1f1a1da21d
7 changed files with 13 additions and 9 deletions
  1. 2
      build/minified/modules/behavior/form.js
  2. 2
      build/uncompressed/modules/behavior/form.js
  3. 7
      node/src/documents/index.html.eco
  4. 2
      node/src/files/release/minified/modules/behavior/form.js
  5. 2
      node/src/files/release/uncompressed/modules/behavior/form.js
  6. 5
      node/src/files/stylesheets/semantic.css
  7. 2
      src/modules/behavior/form.js

2
build/minified/modules/behavior/form.js

@ -121,7 +121,7 @@ $.fn.form = function(fields, parameters) {
.blur()
;
}
if( key == keyCode.enter && $field.is(selector.input) ) {
if(!event.ctrlKey && key == keyCode.enter && $field.is(selector.input) ) {
module.debug('Enter key pressed, submitting form');
$submit
.addClass(className.down)

2
build/uncompressed/modules/behavior/form.js

@ -121,7 +121,7 @@ $.fn.form = function(fields, parameters) {
.blur()
;
}
if( key == keyCode.enter && $field.is(selector.input) ) {
if(!event.ctrlKey && key == keyCode.enter && $field.is(selector.input) ) {
module.debug('Enter key pressed, submitting form');
$submit
.addClass(className.down)

7
node/src/documents/index.html.eco

@ -255,9 +255,8 @@ type : 'Semantic'
</div>
</div>
<div class="ui divider"></div>
<div class="ui bulleted horizontal link list">
<a class="item">Github</a>
<a class="item">Contributors</a>
<a class="item">Quirky.com</a>
<div class="ui divided horizontal footer link list">
<a href="https://github.com/jlukic/Semantic-UI" class="item">Github</a>
<a href="http://www.quirky.com" class="item">Quirky.com</a>
<div class="item">jack lukic 2013</div>
</div>

2
node/src/files/release/minified/modules/behavior/form.js

@ -121,7 +121,7 @@ $.fn.form = function(fields, parameters) {
.blur()
;
}
if( key == keyCode.enter && $field.is(selector.input) ) {
if(!event.ctrlKey && key == keyCode.enter && $field.is(selector.input) ) {
module.debug('Enter key pressed, submitting form');
$submit
.addClass(className.down)

2
node/src/files/release/uncompressed/modules/behavior/form.js

@ -121,7 +121,7 @@ $.fn.form = function(fields, parameters) {
.blur()
;
}
if( key == keyCode.enter && $field.is(selector.input) ) {
if(!event.ctrlKey && key == keyCode.enter && $field.is(selector.input) ) {
module.debug('Enter key pressed, submitting form');
$submit
.addClass(className.down)

5
node/src/files/stylesheets/semantic.css

@ -433,6 +433,11 @@ a:hover {
margin: 1em 0em 1.5em;
padding: 0px;
}
#example .footer.link.list {
display: block;
text-align: center;
margin-bottom: 1.5rem;
}
/*--------------

2
src/modules/behavior/form.js

@ -121,7 +121,7 @@ $.fn.form = function(fields, parameters) {
.blur()
;
}
if( key == keyCode.enter && $field.is(selector.input) ) {
if(!event.ctrlKey && key == keyCode.enter && $field.is(selector.input) ) {
module.debug('Enter key pressed, submitting form');
$submit
.addClass(className.down)

Loading…
Cancel
Save