BUG: common-height

3 replies · opened Jul 25, 2016

Hhare9821Jul 25, 2016

hi

I found a little bug that prevents common-height class to work correctly.

		commonHeight: function( element ){
			var maxHeight = 0;
			element.children('[class*=col-]').each(function() {
				// var element = $(this).children(); //---- ORIGINAL
				var element = $(this) //------------------- FIXED
				if( element.hasClass('max-height') ){
					maxHeight = element.outerHeight();
				} else {
					if (element.outerHeight() > maxHeight)
					maxHeight = element.outerHeight();
				}
			});

the ORIGINAL and FIXED comments shows the bug-fix difference.

at the Original line, $(this) points to children of a container with common-height class. those should be watched for height.(technically max-height). and you are querying $(this) children and looking for hasClass... in the next line on the QUERY object.

I think with removing .children() code works as it is expected.

thank you

SSemicolon WebSTAFFJul 25, 2016

Hello,

Thanks for your Message. Actually var element = $(this).children(); is the correct code since the Common Height's content is wrapped inside a div Container which determines the Correct Height of the Common Height element.

Hope this Helps. Do let us know if we can help you with anything else or if you find any further issues with Canvas.

Hhare9821Jul 25, 2016

yes I was wrong. please delete this thread if you like. thank you

SSemicolon WebSTAFFJul 27, 2016

Hello,

No Problems at all! Very Happy to Help! :)

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard