1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 01:34:31 +02:00

Fix issue processwire/processwire-issues#11 where hitting enter in text field could trigger buttons in InputfieldImage

This commit is contained in:
Ryan Cramer
2016-09-30 09:23:58 -04:00
parent 1cbd3fa9a4
commit 7e7c74f3e7
3 changed files with 5 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ function InputfieldImage($) {
var uploadReplace = {
file: '', // basename of file being replaced
item: null, // the .gridImage item that is being replaced
edit: null, // the .InputfieldImageEdit.gridImage item (edit panel) that is being replaced
edit: null // the .InputfieldImageEdit.gridImage item (edit panel) that is being replaced
};
// Base options for MagnificPopup
@@ -107,7 +107,7 @@ function InputfieldImage($) {
$el.addClass('InputfieldImageSorting');
},
stop: function(e, ui) {
$this = $(this);
var $this = $(this);
if(timer !== null) {
ui.item.find(".InputfieldImageEdit__edit").click();
clearTimeout(timer);

File diff suppressed because one or more lines are too long

View File

@@ -674,12 +674,12 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList {
if($n) {}
$out = "
<button data-href='$editUrl' class='InputfieldImageButtonCrop $buttonClass' $modalAttrs>
<button type='button' data-href='$editUrl' class='InputfieldImageButtonCrop $buttonClass' $modalAttrs>
<span class='ui-button-text'>
<span class='fa fa-crop'></span> $labels[crop]
</span>
</button>
<button data-href='$variationUrl' class='$buttonClass' data-buttons='button'>
<button type='button' data-href='$variationUrl' class='$buttonClass' data-buttons='button'>
<span class='ui-button-text'>
<span class='fa fa-files-o'></span>
$labels[variations]