angular-foundation-6
angular-foundation-6 copied to clipboard
OffCanvas: bug close offcanvas panel on click
Hi, i have a problem with offCanvas component caused by angular-foundation.js code. In particular the code who has the issue is relative to 'li' directive:
`.directive('li', function () { 'ngInject';
return {
require: '?^^offCanvas',
restrict: 'E',
link: function link($scope, element, attrs, offCanvas) {
if (!offCanvas || offCanvas.offCanvasWrapper.disableAutoClose)
{
return;
}
element.on('click', function () {
offCanvas.offCanvasWrapper.hide();
});
}
};
});`
when in my template i click on an element inside the canvas (i use kendo-ui widgets) in some circumstances the code go inside element.on('click', function () {
and the canvas close itself.
the problem is not only that canvas is closed, but if i have the content-overlay property set to true, cause the overlay to stay on top of template and lock all user interface.
As workaround i solved this bug removing the line offCanvas.offCanvasWrapper.hide()
what is the porpouse of this code? why it have to close canvas on click? Thanks