Skip to content
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.

Commit

Permalink
More fixes for breadcrumb dropdown menu autohiding
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Eisenberg committed Jan 24, 2013
1 parent 2a80ccd commit fd87a64
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions client/scripts/scripted/editor/editorPane.js
Expand Up @@ -132,6 +132,8 @@ function(mKeybinder, mEditor, mPaneFactory, mNavHistory, mKeyBinding, mPageState

var openRequests = {};
var closeRequests = {};

// breadcrumb enter will open drop-down after auto-activation time
$('#breadcrumb > li').on('mouseenter', function(evt) {
var self = this;
var id = $(self).attr('data-id');
Expand All @@ -147,6 +149,7 @@ function(mKeybinder, mEditor, mPaneFactory, mNavHistory, mKeyBinding, mPageState
}
});

// breadcrumb leave will close drop-down after auto-activation time
$('#breadcrumb > li').on('mouseleave', function(evt) {
var self = this;
var id = $(self).attr('data-id');
Expand All @@ -163,6 +166,17 @@ function(mKeybinder, mEditor, mPaneFactory, mNavHistory, mKeyBinding, mPageState
}
});

// breadcrumb drop-down enter will stop the auto-close of drop-down
$('.breadcrumb_menu').on('mouseenter', function(evt) {
var self = this;
var id = $(self).attr('data-id');
if (closeRequests[id]) {
window.clearTimeout(closeRequests[id]);
delete closeRequests[id];
}
});

// breadcrumb drop-down leave will auto-close the drop-down after auto-activation time
$('.breadcrumb_menu').on('mouseleave', function(evt) {
var self = this;
var id = $(self).attr('data-id');
Expand Down

0 comments on commit fd87a64

Please sign in to comment.