#6489 closed defect (fixed)
1.0 Breaking API change in dijit.form.TextBox
Reported by: | Jared Jurkiewicz | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | high | Milestone: | 1.1.1 |
Component: | Dijit - Form | Version: | 1.1.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
1.0 Breaking API change in dijit.form.TextBox?
In 1.0.2, dijit.form.TextBox? had a public function, onkeyup, that was called anytime a key event occurred in the textbox. The demo:
dojox/wire/demos/markup/demo_ConditionalActions.html made use of this event to mirror content on each keypress.
In 1.1, this API is flat *gone* and no onkeyup events are occurring anymore. Since this was a public API on the class (no _), this constitutes a breaking API change and should be corrected.
Change History (12)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Owner: | set to Douglas Hays |
---|---|
Priority: | normal → high |
The onChange with intermediateChanges=true was designed for this, but that's not working. I'll target fixing onChange for 1.2 since it was already broken in 1.0 (the root cause of having to use onkeyup). Bill never intended onkeyup to be part of the public API, but rather a missing underscore on a private function name. It's also very hard to deprecate an event handler since users could be connected to the method and thus no way to notify them to not do that. I'll reference this defect and put the onkeyup function back in for 1.1.1.
comment:3 Changed 13 years ago by
The workaround I can use temporarily is to connect to: widget.domNode.onkeyup to get the same behavior back.
But, for reference, outside of the four demos this broke, it also breaks two known applications as well and potentially others. So, it's good to get the api back into 1.1.0. Thank you for that.
comment:4 Changed 13 years ago by
comment:5 Changed 13 years ago by
Milestone: | 1.1.1 → 1.2 |
---|
comment:6 Changed 13 years ago by
Milestone: | 1.2 → 1.1.1 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:7 Changed 13 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Is this really fixed? Checking the mentioned demo's still seems broken, but maybe I'm just misunderstanding what's going on here. in 1.1.1 onkeyup is back, but not in 1.2? intermediateChanges=true is the solution?
http://dojotoolkit.org/forum/dojox-dojox/dojox-support/wireml-problems-w-demos-dojo-1-1#comment-14773 }}} is there a testcase for onkeyup anywhere? i wasn't able to find one offhand. looking at the textBox template in [13316] it looks like you restored onkeyup firing to an onkeypress event, but in 1.0 it seems like it was attached to both onkeyup and onkeypress
comment:8 Changed 13 years ago by
comment:9 Changed 13 years ago by
Milestone: | 1.1.1 → 1.2 |
---|---|
Owner: | changed from Douglas Hays to Jared Jurkiewicz |
Status: | reopened → new |
Existing uses of onkeyup to track onchange events should be changed to use intermediateChanges=true in dojo 1.2.
comment:10 Changed 13 years ago by
Priority: | high → normal |
---|
comment:11 Changed 13 years ago by
Milestone: | 1.2 → 1.1.1 |
---|---|
Priority: | normal → high |
Resolution: | → fixed |
Status: | new → closed |
comment:12 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
This broke a bunch of dojox.wire demos, which is hwo ti came to my attention. Namely, it broke:
dojox/wire/demos/markup/demo_ConditionalActions.html dojox/wire/demos/markup/demo_ActionChaining.html dojox/wire/demos/markup/demo_TopicWiring.html
All of which used TextBox? and listened for keyup events to drive dynamic page changes, topic publishes, etc.