Clicking outside Statistics closes it but clicking outside Manage dialog doesnt - DONE (3hr) (08-08-22)

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


Comments

No comments yet.

Related Posts

Fixing top header UI in public network page - 1hr

Created: 2 years ago  Author: Md Mahfoozur Rahman

21-01-23 UI changes on top header -- 11hrs

Created: 3 years ago  Author: Md Mahfoozur Rahman

can we please get the image for the network (1hr)

Created: 3 years ago  Author: Md Mahfoozur Rahman

why manage network emtpy

Created: 3 years ago  Author: Md Mahfoozur Rahman

how do i edit project name etc from right sidebar - DONE 15-08-22 ( 8:49pm ) 30 mins

Created: 3 years ago  Author: Md Mahfoozur Rahman

should we go back to white canvas and light grey bg - DONE 15-08-22 ( 7:59pm ) 1hr

Created: 3 years ago  Author: Md Mahfoozur Rahman

Layout issues 02-08-22 - DONE 2hrs (14-08-22)

Created: 3 years ago  Author: Md Mahfoozur Rahman