Commit 984bbfb1 authored by bbaer's avatar bbaer
Browse files

Added max height + sizing on init

parent 214b06fc
Pipeline #2647 passed with stages
in 2 minutes and 45 seconds
......@@ -12,12 +12,25 @@ $(document).ready( function () {
tablesorterController.setup($(this), i);
}); // end .each()
$('.qfq-auto-grow').on('input', function() {
if($(this).height() + 10 < $(this).prop('scrollHeight')) {
$(this).height($(this).prop('scrollHeight'));
$('.qfq-auto-grow').each(function() {
var newHeight = $(this).prop('scrollHeight');
var maxHeight = $(this).data('max-height') || 0;
if(newHeight < maxHeight || maxHeight === 0) {
$(this).height(newHeight);
} else {
$(this).height(maxHeight);
}
});
$('.qfq-auto-grow').on('input', function() {
var newHeight = $(this).prop('scrollHeight');
var maxHeight = $(this).data('max-height') || 0;
if($(this).height() + 10 < newHeight) {
if(newHeight < maxHeight || maxHeight === 0) {
$(this).height(newHeight);
}
}
});
})(QfqNS);
});
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment