Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#8724 closed bug (fixed)

widgetEventPrefix is lost when extending existing widget

Reported by: nix Owned by:
Priority: minor Milestone: 1.9.1
Component: ui.widget Version: 1.9.0
Keywords: Cc:
Blocked by: Blocking:


Tested with dcb671539286dcc58b7e6ffa6035c647500e699a:

$.widget( "", {
  widgetEventPrefix: "baz",

  _someMethod: function() {
    this._trigger( "event" );
$.widget( "", $, {
  _someOtherMethod: function() {

When a widget is declared like this, the widgetEventPrefix is lost when the extension is applied. You can re-add it with an additional

$.widget( "", $, {
  widgetEventPrefix: "baz"

after the declaration of the first extension. Nevertheless, the original should be preserved after the first extension is added, otherwise it's impossible to create optional extensions.

Here's a jsbin with a simple example:

Change History (3)

comment:1 Changed 11 years ago by nix

It might also be worth looking at whether other items besides widgetEventPrefix are also lost in the extension process.

comment:2 Changed 11 years ago by Scott González

Resolution: fixed
Status: newclosed

Widget: Use existing widgetEventPrefix when extending. Fixes #8724 - widgetEventPrefix is lost when extending existing widget.

Changeset: 848ab485839b6dd26f2b6c6680141d95cab32ceb

comment:3 Changed 11 years ago by Scott González

Version: git1.9.0
Note: See TracTickets for help on using tickets.