Opened 10 years ago

Closed 8 years ago

#8802 closed feature (fixed)

Dev: Track down uses of .bind() inside widgets

Reported by: Scott González Owned by:
Priority: minor Milestone: git
Component: [meta] ui.dev Version: git (not yet released)
Keywords: Cc:
Blocked by: Blocking:

Description

Now that _on() has the suppressDisabledCheck flag, we should be able to stop using .bind() directly.

Change History (8)

comment:1 Changed 10 years ago by Scott González

Milestone: 1.10.0git
Status: newopen

comment:2 Changed 10 years ago by Jörn Zaefferer

Does "track down" include fixing?

Button uses plenty of bind()

comment:3 in reply to:  2 Changed 10 years ago by Scott González

Replying to joern.zaefferer:

Does "track down" include fixing?

Not necessarily, it depends on the number of uses. It's entirely possible that separate tickets will be created for fixing individual widgets.

comment:4 Changed 10 years ago by Jörn Zaefferer

Dialog uses bind, I'll clean that up soon(ish).

Droppable has one bind call.

Menu has a single bind call, can be replaced now.

Mouse has several bind calls.

That should be all.

comment:5 Changed 10 years ago by Jörn Zaefferer

Also need to look for usage of shorthands like [click?], [mousedown?] etc. We have those sometimes on generated elements. Though if there's no need for namespacing to begin with, maybe we don't have to bother at all.

Last edited 10 years ago by Jörn Zaefferer (previous) (diff)

comment:6 Changed 8 years ago by Jörn Zaefferer

Current status:

  • Droppable has one bind call
  • Menu is still using bind, really needs to switch to suppressDisabledCheck
  • Mouse still uses bind

comment:7 Changed 8 years ago by Jörn Zaefferer

The one in menu is gone. Removed the entire binding, since we don't need it anymore - Menu doesn't have anchors anymore, so there's no default behaviour to prevent.

comment:8 Changed 8 years ago by Jörn Zaefferer

Resolution: fixed
Status: openclosed

Menu was the last relevant usage of bind. Others are in widgets that we're rewriting anyway (datepicker, button, interactions).

Note: See TracTickets for help on using tickets.