Bug Tracker

Opened 12 years ago

Closed 10 years ago

#3006 closed enhancement (invalid)

[validate] Validation plugin is slow when onkeyup activated

Reported by: lideln Owned by: joern
Priority: minor Milestone: 1.3
Component: plugin Version: 1.2.6
Keywords: validate Cc:
Blocked by: Blocking:

Description

Validate-plugin is slow when onkeyup is activated. I have some fields, and one of them is using a custom validation function, which just performs a regex test (two regex actually). Plugin "slows down computer", I mean there is a delay between typing a key and having the letter appear.

I suggest using sort of a timer to detect "end of typing" and then performing validation (and not on keyup, which is in fact not interesting).

Thanks for this plugin, have a nice day ! :)

Change History (5)

comment:1 Changed 11 years ago by joern

Resolution: worksforme
Status: newclosed

You can always disable keyup-validation via onkeyup:false.

If that isn't enough, please provide an example of your custom method, and reopen this ticket.

comment:2 Changed 11 years ago by antix

Resolution: worksforme
Status: closedreopened

I am experiencing the same issue It seems a shame to loose the keyup functionality, can the validation be called after a pause on keyup so...

var keyupPauseId;

onkeyup = function(){
 if(keyupPauseId){ clearInterval(keyupPauseId);}
 keyupPauseId = setTimeout(doValidation, 2500);
}

this is obviously psuedo-code, just to give an idea of what I mean

comment:3 Changed 11 years ago by antix

sorry clearTimeout ~clearInterval

comment:4 Changed 10 years ago by dmethvin

Owner: set to joern
Status: reopenednew

comment:5 Changed 10 years ago by john

Resolution: invalid
Status: newclosed

Please file plugin bugs with the appropriate author on their bug tracker.

Note: See TracTickets for help on using tickets.