Side navigation
#10705 closed bug (fixed)
Opened November 07, 2011 04:56PM UTC
Closed November 10, 2011 02:29AM UTC
off bug event name parser
Reported by: | Math. | Owned by: | dmethvin |
---|---|---|---|
Priority: | low | Milestone: | 1.7.1 |
Component: | event | Version: | 1.7 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Adding an extra space at the end or at the beginning of the event name will reset all previous event attached to the element.
Fix: apply "trim" to event name.
See it in action:
Attachments (0)
Change History (5)
Changed November 07, 2011 05:18PM UTC by comment:1
Changed November 07, 2011 06:11PM UTC by comment:2
component: | unfiled → event |
---|---|
milestone: | None → 1.7.1 |
owner: | → dmethvin |
priority: | undecided → low |
status: | new → assigned |
Changed November 07, 2011 07:42PM UTC by comment:3
Replying to [comment:1 rodneyrehm]:
.off() also does not unbind multiple space separated elements as seen in this fiddle: http://jsfiddle.net/rodneyrehm/A5gvn/
.off() also DOES unbind multiple space separated elements.
You made a mistake, check:
Changed November 08, 2011 01:34PM UTC by comment:4
Replying to [comment:3 Math.]:
Replying to [comment:1 rodneyrehm]: > .off() also does not unbind multiple space separated elements as seen in this fiddle: http://jsfiddle.net/rodneyrehm/A5gvn/ .off() also DOES unbind multiple space separated elements. You made a mistake, check: http://jsfiddle.net/A5gvn/2/
The docs state »One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".«
So I'd expect .off(".namespace1 .namespace2 click keyup.namespace3") to remove all events of namespace [namespace1, namespace2], all click events and the keyup events of namespace3.
That is currently not the case. If the above mixing is not intended to work, the docs should state that accordingly.
.off() also does not unbind multiple space separated elements as seen in this fiddle: http://jsfiddle.net/rodneyrehm/A5gvn/