Skip to content

Commit

Permalink
use input event instead of keyup
Browse files Browse the repository at this point in the history
This should also catch copy'n'paste actions.

https://caniuse.com/#feat=input-event
  • Loading branch information
splitbrain committed May 30, 2017
1 parent cf018a6 commit 88aaa9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jQuery(function () {
// disable submit unless something is in input or input is disabled
if ($title.attr('type') === 'text') {
$submit.attr('disabled', 'disabled');
$title.keyup(function () {
$title.on('input', function () {
if ($title.val().length > 0) {
$submit.removeAttr('disabled');
} else {
Expand Down

0 comments on commit 88aaa9d

Please sign in to comment.