Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#15180 closed bug (worksforme)

Position plugin writes to $.ui whether it exists or not

Reported by: Max Loeb Owned by:
Priority: minor Milestone: none
Component: ui.position Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by Max Loeb)

The jqueryui position plugin describes itself in this way:

"This is a standalone jQuery plugin and has no dependencies on other jQuery UI components."

While it's true that it doesn't depend on other jQuery UI components, it does seem to depend on the base jqueryui.js file being included, but only for the "$.ui" namespace to exist. If you don't include jqueryui then it crashes on line 318 of position.js:

For people like me who want the functionality in this plugin but don't otherwise need the code in jqueryui, this can be quite frustrating.

Apologies for not posting a jsfiddle, but I was unable to find a CDN that had a recent version of the standalone position.js file.

Change History (3)

comment:1 Changed 6 years ago by Max Loeb

Description: modified (diff)

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

Resolution: worksforme
Status: newclosed

I assume you're using the source files and no dependency resolvers.

While the position plugin has no dependency on other UI components, it does have a dependency on $.ui existing. This dependency is met by the plugin's defined dependencies, which include just the version component. The version component ensures that `$.ui` exists. We do not support using the plugins without their defined dependencies.

comment:3 Changed 6 years ago by Max Loeb

Ah, that makes sense, thank you.

Note: See TracTickets for help on using tickets.