Re: textarea
Posted: Thu Oct 24, 2019 12:06 pm
Here's a another (simpler) version that works without ResizeObserver and it should also be more performant.
Code: Select all
if (nuFormType() == 'edit') {
var curIndex = 2;
// Save initial textarea dimensions (height, width)
$("textarea").each(function () {
$(this).data('height', $(this).height()).data('width', $(this).width());
});
$("textarea").mousedown(function () {
// Set the active textarea on top
this.style.zIndex = ++curIndex;
var t = this;
// Restore dimensions of the other textareas
$("textarea").each(function () {
if(t !== this) {
$(this).height($(this).data('height')).width($(this).data('width'));
}
});
});
}