Skip to content

Commit 00ea223

Browse files
committed
FIX: prevent input[type="radio"] from loosing focus on sort in UI repeater
1 parent 46f666f commit 00ea223

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

cherry-core.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
33
* Class Cherry Core
4-
* Version: 1.5.4
4+
* Version: 1.5.4.1
55
*
66
* @package Cherry_Framework
77
* @subpackage Class

modules/cherry-ui-elements/inc/ui-elements/ui-repeater/assets/min/ui-repeater.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/cherry-ui-elements/inc/ui-elements/ui-repeater/assets/ui-repeater.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,16 @@
118118
scrollSensitivity: 40,
119119
forcePlaceholderSize: true,
120120
forceHelperSize: false,
121-
helper: 'clone',
121+
distance: 2,
122+
tolerance: 'pointer',
123+
helper: function( event, element ) {
124+
return element.clone()
125+
.find( ':input' )
126+
.attr( 'name', function( i, currentName ) {
127+
return 'sort_' + parseInt( Math.random() * 100000, 10 ).toString() + '_' + currentName;
128+
} )
129+
.end();
130+
},
122131
opacity: 0.65,
123132
placeholder: self.sortablePlaceholderClass,
124133
create: function() {

0 commit comments

Comments
 (0)