Created: 3 years ago Author: Md Mahfoozur Rahman
how come clicking outside Statistics closes it but clicking outside Manage dialog doesnt
I misunderstood the issue initially and roughly implemented feature of closing rightsidebar by clicking outside anywhere. I was huffing and puffing for finding that solution with no luck. It took me 2-3 hrs. I remember I was sitting till 4:15pm in the afternoon for this solution. The I understood this is not what Rene meant.
So, that rough snippet is like below
$(document).on('click', function(e) { // under data tab selecting colorpicker to add class jscolor-ele so that closing rightbar can be prevented $('#CopyPasteDiv').next().children().eq(1).children().find('div').addClass('jscolor-ele'); // console.log($(e.target).attr('class')); if( !$(e.target).is('.togglebar, .btn, .close, .jscolor, .fas, .colorPicker-swatch, .jscolor-ele, .project_title') ) { var sidebars = ['rightbar1','rightbar2','rightbar3','rightbar4','rightbar5']; sidebars.forEach(function(sideBar) { if($(e.target).closest('#'+sideBar).length != 0) return false; if ( $('#'+sideBar).hasClass('sidebar-visible') ) { $('#'+sideBar).removeClass('sidebar-visible').addClass('sidebar-remove'); } }); } });
Ultimately, this problem is fixed checking modal code where "vertical-alignment-helper" this class was added for manage modal.
I tracked to css/asset/custom.css found out this code added
.vertical-alignment-helper {
display: table;
height: 100%;
width: 100%;
}
.vertical-align-center {
display: table-cell;
vertical-align: middle;
}
So I removed it, then clicking outside modal for manage started working. It took me half an hour to find it.
But before that, I thought I have added this following snippet somewhere in code inside modal trigger link which prevents modal with clicking outside
data-backdrop: "static" and data-keyboard: false
Or added in js with following snippet.
$("#netManageModal").modal({ backdrop: "static ", keyboard: false });
But as soon as I found out this is not the case then I tracked with the above mentioned class in css file and removing that fixed the problem of not closing the manage modal clicking outside of it.
Topic: Layout Topic Creator: Md Mahfoozur Rahman
Created: 2 years ago Author: Md Mahfoozur Rahman
Created: 3 years ago Author: Md Mahfoozur Rahman
Created: 3 years ago Author: Md Mahfoozur Rahman
Created: 3 years ago Author: Md Mahfoozur Rahman
Created: 3 years ago Author: Md Mahfoozur Rahman
Created: 3 years ago Author: Md Mahfoozur Rahman
Created: 3 years ago Author: Md Mahfoozur Rahman