#11638 closed bug (invalid)
PreventDefault in keypress event cancels change event after multiple calls.
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | event | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Returning false or using preventDefault from a keypress handler for a textbox, will prevent a change event from triggering for the same textbox after multiple calls.
The steps to reproduce this bug are in the following jsFiddle: http://jsfiddle.net/portablesheep/hYmue/9/
You'll notice this example is using keypress to detect enter, and subsequently click a button. This example was chosen as it's a scenario I ran into at work.
Change History (2)
comment:1 Changed 11 years ago by
Component: | unfiled → event |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
comment:2 Changed 11 years ago by
I see what you're saying. I was under the impression that by pressing enter in this case with a different value than the original, that the change event would occur. I didn't think about the blur being the trigger, and blur not occurring in this scenario.
I followed your instructions to the letter and I'm not sure how you didn't notice that your own documented instructions provide the answer you need:
... Nothing has changed since the change event at #1, it is still "123"