Skip to content

Commit

Permalink
Fixed toolbar menu scrolling on mobile.
Browse files Browse the repository at this point in the history
It wasn't possible to scroll the menu if it was initiated on
disabled item.
  • Loading branch information
vxsx committed Jul 18, 2016
1 parent ab9e7f5 commit ce985ef
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
=== 3.3.2 (unreleased) ===

* Fixed a bug where it wasn't possible to scroll the toolbar menu if scroll
started on the disabled menu item on small screens.


=== 3.3.1 (2016-07-13) ===

* Added a warning for users who are leaving the page or closing the plugin
Expand Down
2 changes: 1 addition & 1 deletion cms/static/cms/css/cms.base.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions cms/static/cms/js/dist/bundle.toolbar.min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions cms/static/cms/js/modules/cms.toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ var Toolbar = new Class({
});

// attach hover
lists.on(that.pointerOverOut, 'li', function () {
lists.on(that.pointerOverOut, 'li', function (e) {
var el = $(this);
var parent = el.closest('.cms-toolbar-item-navigation-children')
.add(el.parents('.cms-toolbar-item-navigation-children'));
Expand All @@ -264,7 +264,8 @@ var Toolbar = new Class({
// do not attach hover effect if disabled
// cancel event if element has already hover class
if (el.hasClass(disabled)) {
return false;
e.stopPropagation();
return;
}
if (el.hasClass(hover)) {
return true;
Expand Down
1 change: 0 additions & 1 deletion cms/static/cms/sass/components/_toolbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@
border-top: none;
border-radius: 0 0 $toolbar-dropdown-border-radius $toolbar-dropdown-border-radius;
background-color: $toolbar-dropdown-bgcolor;
background: rgba($toolbar-dropdown-bgcolor, 0.97);
box-shadow: $toolbar-dropdown-shadow;
}
ul li {
Expand Down

0 comments on commit ce985ef

Please sign in to comment.