#9316 closed bug (fixed)
Widget: widgetEventPrefix is empty when widget is (occasionally) loaded twice
Reported by: | Victor Homyakov | Owned by: | Scott González |
---|---|---|---|
Priority: | minor | Milestone: | 1.10.4 |
Component: | ui.widget | Version: | 1.10.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When widgetEventPrefix
isn't defined explicitly, and the same widget is loaded more than once (e.g. because of wrong production build script or race condition in asynchronous loading), then widgetEventPrefix
is set to empty string as in this fiddle: http://jsfiddle.net/9cRa3/1/
This may lead to hardly reproducible errors.
Change History (6)
comment:1 Changed 10 years ago by
Status: | new → open |
---|---|
Summary: | widgetEventPrefix is empty when widget is (occasionally) loaded twice → Widget: widgetEventPrefix is empty when widget is (occasionally) loaded twice |
comment:2 Changed 10 years ago by
Owner: | set to scott.gonzalez |
---|---|
Status: | open → assigned |
I don't think we can use existingContructor.prototype
for anything since we're not dealing with inheritance. The conditional just needs to be stricture.
comment:3 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Widget: Properly set widgetEventPrefix when redefining a widget. Fixes #9316 - Widget: widgetEventPrefix is empty when widget is (occasionally) loaded twice.
Changeset: 2eb89f07341a557084fa3363fe22afe62530654d
comment:4 Changed 10 years ago by
Milestone: | none → 1.11.0 |
---|
comment:5 Changed 9 years ago by
Widget: Properly set widgetEventPrefix when redefining a widget. Fixes #9316 - Widget: widgetEventPrefix is empty when widget is (occasionally) loaded twice. (cherry picked from commit 2eb89f07341a557084fa3363fe22afe62530654d)
Changeset: c241313f1d31b18751a81c1321662512d8086cbc
comment:6 Changed 9 years ago by
Milestone: | 1.11.0 → 1.10.4 |
---|
Seems like we could just use
existingConstructor.prototype.widgetEventPrefix
in the first half of the ternary here: https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.widget.js#L109.