Skip to content

Commit

Permalink
[cmd:quicklok] correction of show/hide control of navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed Jul 24, 2016
1 parent fa48e04 commit fa8bdf2
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions js/commands/quicklook.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,17 @@ elFinder.prototype.commands.quicklook = function() {
e.stopPropagation();
e.preventDefault();

win.toggleClass(fullscreen);
if (full) {
win.css(win.data('position'));
navStyle = '';
navShow();
win.toggleClass(fullscreen)
.css(win.data('position'));
$window.off(scroll).trigger(self.resize).off(self.resize);
navbar.off('mouseenter mouseleave');
cover.off(coverEv);
navStyle = '';
navShow();
} else {
win.data('position', {
win.toggleClass(fullscreen)
.data('position', {
left : win.css('left'),
top : win.css('top'),
width : win.width(),
Expand Down Expand Up @@ -241,6 +242,7 @@ elFinder.prototype.commands.quicklook = function() {
navShow = function() {
if (self.window.hasClass(fullscreen)) {
navtm && clearTimeout(navtm);
navtm = null;
// if use `show()` it make infinite loop with old jQuery (jQuery/jQuery UI: 1.8.0/1.9.0)
// see #1478 https://github.com/Studio-42/elFinder/issues/1478
navbar.stop(true, true).css('display', 'block');
Expand All @@ -250,6 +252,7 @@ elFinder.prototype.commands.quicklook = function() {

coverHide = function() {
cover.data('tm') && clearTimeout(cover.data('tm'));
cover.removeData('tm');
cover.hide();
},

Expand Down

0 comments on commit fa8bdf2

Please sign in to comment.