Closed lvostinar closed 10 years ago
When we use these two options (using calbox mode) and click on field to open picker the picker opens twice causing a flicker effect. This is caused by two different events that open picker:
w.d.wrap.parent().on(o.clickEvent, function() { if ( !w.disabled && o.useFocus === true && o.useNewStyle === false ) { w.d.input.trigger('datebox', {'method': 'open'}); w.d.wrap.addClass('ui-focus'); w.d.input.removeClass('ui-focus'); setTimeout(function(){ w.d.wrap.removeClass('ui-focus'); w.d.wrap.parent().addClass('ui-focus'); }, 500); } });
and
.focus(function(){ if ( w.disabled === false && o.useFocus === true ) { w.d.input.trigger('datebox', {'method': 'open'}); w.d.wrap.addClass('ui-focus'); w.d.input.removeClass('ui-focus'); if ( o.useNewStyle === false ) { w.d.input.parent().removeClass('ui-focus'); w.d.wrap.parent().addClass('ui-focus'); } } if ( o.useNewStyle === false ) { w.d.input.removeClass('ui-focus'); } })
Indeed. Added a useFocus trap to newStyle:false to just focus the input on button click rather than actually opening.
When we use these two options (using calbox mode) and click on field to open picker the picker opens twice causing a flicker effect. This is caused by two different events that open picker:
w.d.wrap.parent().on(o.clickEvent, function() { if ( !w.disabled && o.useFocus === true && o.useNewStyle === false ) { w.d.input.trigger('datebox', {'method': 'open'}); w.d.wrap.addClass('ui-focus'); w.d.input.removeClass('ui-focus'); setTimeout(function(){ w.d.wrap.removeClass('ui-focus'); w.d.wrap.parent().addClass('ui-focus'); }, 500); } });
and
.focus(function(){ if ( w.disabled === false && o.useFocus === true ) { w.d.input.trigger('datebox', {'method': 'open'}); w.d.wrap.addClass('ui-focus'); w.d.input.removeClass('ui-focus'); if ( o.useNewStyle === false ) { w.d.input.parent().removeClass('ui-focus'); w.d.wrap.parent().addClass('ui-focus'); } } if ( o.useNewStyle === false ) { w.d.input.removeClass('ui-focus'); } })