Replace keyup with keypress to avoid false-positive in modification detection