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:
@@ -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
@@ -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]
|
||||
|
Reference in New Issue
Block a user