mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-09-26 07:16:13 +00:00
debouncing inputs
This commit is contained in:
@@ -73,6 +73,7 @@ $(document).ready(function () {
|
||||
|
||||
const vh = Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0);
|
||||
$("#text-preview-inner").css('max-height', (vh-300)+"px");
|
||||
var debounced_request_textpreview_update = request_textpreview_update.debounce(100);
|
||||
|
||||
$("#activate-text-preview").click(function (e) {
|
||||
$(this).fadeOut();
|
||||
@@ -82,10 +83,8 @@ $(document).ready(function () {
|
||||
$("#text-preview-refresh").click(function (e) {
|
||||
request_textpreview_update();
|
||||
});
|
||||
$('textarea:visible, input:visible').on('keyup keypress blur change click', function (e) {
|
||||
request_textpreview_update();
|
||||
});
|
||||
|
||||
$('textarea:visible').on('keyup blur', debounced_request_textpreview_update);
|
||||
$('input:visible').on('keyup blur change', debounced_request_textpreview_update);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user