Browse Source

Add visibility check back to can show #2842

pull/2850/head
jlukic 9 years ago
parent
commit
2e27d00a97
1 changed files with 22 additions and 20 deletions
  1. 42
      src/definitions/modules/search.js

42
src/definitions/modules/search.js

@ -291,7 +291,7 @@ $.fn.search = function(parameters) {
return $.fn.api !== undefined;
},
show: function() {
return !module.is.visible() && module.is.focused() && !module.is.empty();
return module.is.focused() && !module.is.visible() && !module.is.empty();
},
transition: function() {
return settings.transition && $.fn.transition !== undefined && $module.transition('is supported');
@ -763,26 +763,28 @@ $.fn.search = function(parameters) {
},
showResults: function() {
if( module.can.transition() ) {
module.debug('Showing results with css animations');
$results
.transition({
animation : settings.transition + ' in',
debug : settings.debug,
verbose : settings.verbose,
duration : settings.duration,
queue : true
})
;
}
else {
module.debug('Showing results with javascript');
$results
.stop()
.fadeIn(settings.duration, settings.easing)
;
if(!module.is.visible()) {
if( module.can.transition() ) {
module.debug('Showing results with css animations');
$results
.transition({
animation : settings.transition + ' in',
debug : settings.debug,
verbose : settings.verbose,
duration : settings.duration,
queue : true
})
;
}
else {
module.debug('Showing results with javascript');
$results
.stop()
.fadeIn(settings.duration, settings.easing)
;
}
settings.onResultsOpen.call($results);
}
settings.onResultsOpen.call($results);
},
hideResults: function() {
if( module.is.visible() ) {

Loading…
Cancel
Save