posabsolute/jQuery-Validation-Engine — pull request #387 by owenallenaz (2012-06-01 01:29:12+00:00)
Title: Fixes: promptPosition centerRight does not work when jQueryUI is also loaded

This commit changes a call to `outerWidth(1)` to `outerWidth(true)`. This matches the jQuery documentation, allow it to work with jQueryUI and future proofs it for jQuery edge versions.

Explanation:

There is a call in `_calculatePosition` which uses `outerWidth(1)` to determine the width of the input when placing the prompt next to it. The desire of the call is to get an integer containing the full elements padding, margin, and borders. BUT, when jQueryUI is present, `outerWidth(1)` returns a reference to a jQuery object and not an integer. (Why does jQueryUI do that? I do not know). In addition, if you look at the edge version of jQuery you'll notice that `outerWidth()` will become a getter and a setter similar to how `width()` is. Thus, `outerWidth(1)` will make the element have a total width of 1px.

This commit should fix all of the above problems.