Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing dependency #159

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions bootstrap-hover-dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
},
showEvent = 'show.bs.dropdown',
hideEvent = 'hide.bs.dropdown',
// shownEvent = 'shown.bs.dropdown',
// hiddenEvent = 'hidden.bs.dropdown',
// shownEvent = 'shown.bs.dropdown',
// hiddenEvent = 'hidden.bs.dropdown',
settings = $.extend(true, {}, defaults, options, data),
timeout, timeoutHover;

$parent.hover(function (event) {
// so a neighbor can't open the dropdown
if(!$parent.hasClass('open') && !$this.is(event.target)) {
if(!$parent.hasClass('open') && !$.contains($this[0], $(event.target)[0])) {
// stop this event, stop executing any code
// in this callback but continue to propagate
return true;
Expand All @@ -68,7 +68,7 @@
$this.hover(function (event) {
// this helps prevent a double event from firing.
// see https://github.com/CWSpear/bootstrap-hover-dropdown/issues/55
if(!$parent.hasClass('open') && !$parent.is(event.target)) {
if(!$parent.hasClass('open') && !$.contains($parent[0], $(event.target)[0])) {
// stop this event, stop executing any code
// in this callback but continue to propagate
return true;
Expand Down Expand Up @@ -105,14 +105,14 @@
window.clearTimeout(timeout);
// restart hover timer
window.clearTimeout(timeoutHover);

// delay for hover event.
timeoutHover = window.setTimeout(function () {
$allDropdowns.find(':focus').blur();

if(settings.instantlyCloseOthers === true)
$allDropdowns.removeClass('open');

// clear timer for hover event
window.clearTimeout(timeoutHover);
$this.attr('aria-expanded', 'true');
Expand Down
2 changes: 1 addition & 1 deletion bootstrap-hover-dropdown.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"gulp-filter": "^2.0.0",
"gulp-git": "^0.5.6",
"gulp-rename": "^1.2.0",
"gulp-replace": "^0.5.4",
"gulp-tag-version": "^1.2.1",
"gulp-uglify": "^1.1.0",
"streamqueue": "^0.1.1"
Expand Down