Skip to main content

Search and Top Navigation

#15180 closed bug (worksforme)

Opened April 22, 2017 11:55PM UTC

Closed April 23, 2017 11:32AM UTC

Last modified April 23, 2017 05:42PM UTC

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

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

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:

https://github.com/jquery/jquery-ui/blob/master/ui/position.js#L317

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.

Attachments (0)
Change History (3)

Changed April 22, 2017 11:57PM UTC by shmax comment:1

description: 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: \ \ \ {{{ \ $.ui.position = { \ }}} \ \ 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. \ \ \ 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: \ \ https://github.com/jquery/jquery-ui/blob/master/ui/position.js#L317 \ \ 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. \ \ \

Changed April 23, 2017 11:32AM UTC by scottgonzalez comment:2

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.

Changed April 23, 2017 05:42PM UTC by shmax comment:3

Ah, that makes sense, thank you.