jquery-maskmoney icon indicating copy to clipboard operation
jquery-maskmoney copied to clipboard

readonly and disabled fields accepts data

Open KabluBR opened this issue 11 years ago • 1 comments

you need to put this line bellow inside function keypressEvent and keydownEvent:

if (!$input.prop('readonly') && !$input.prop('disabled')) {
    //ALL FUNCTION CONTENT HERE
}

This will prevent readonly and disabled fields to be writen by user.

KabluBR avatar Sep 11 '14 21:09 KabluBR

A slightly better fix is to short circuit it at the top of the two key events

function keypressEvent(e) {
    if ($input.prop('readonly') || $input.prop('disabled')) {
        return false;
    }

melloware avatar Sep 16 '16 17:09 melloware