Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jquery/jquery-ui
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: IanSimpson/jquery-ui
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Aug 6, 2013

  1. Update _checkOffset to handle invisible input

    The _findPos function already searches for the nearest visible element, and returns its position. This is good.
    
    The _checkOffset function, however, just deals with the current element, which causes issues where your invisible element is placed oddly by the browser.
    
    The problem is only evident when the datepicker's input element is invisible (e.g. if you're showing an altField instead, and have a button to show the picker) and a descendant of a fixed element, and the screen is scrolled. The conditions never matched, so the documents scroll amount was never subtracted from the datepicker's position.
    
    This fix uses code adapted from the _findPos function to find the nearest visible element and uses that to test the offset. Note that inputHeight and inputWidth are reset to 0, as that's the effective width of an invisible element (although using .outerHeight() actually returns a positive number).
    IanSimpson committed Aug 6, 2013
    Configuration menu
    Copy the full SHA
    348d562 View commit details
    Browse the repository at this point in the history
Loading