Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Draggable: Change to account for Firefox scrollTop() behavior. #565

Closed
wants to merge 1 commit into from

2 participants

Nathan Hammond Mike Sherov
Nathan Hammond

Bug report at: http://bugs.jqueryui.com/ticket/7983

This may not be the right way to fix the problem, but it is a way to fix it.

Mike Sherov
Collaborator

Hi @nathanhammond, thanks again for contributing this patch. We recently re-enabled the test suite for draggable. In order for us to land this patch, we'd need a few tests added to the test suite proving this doesn't break existing functionality and also that it fixes the bug as described. Can you add some tests here please?

Mike Sherov
Collaborator

Hi @nathanhammond, actually, we're not going to land this pull request consider it uses $.browser, which is now deprecated. We'd love a new patch that addresses this issue without browser sniffing, and appreciate the effort here, but I'm going to close this now as we're not going to land it.

Nathan Hammond

I don't disagree, I wasn't happy with the solution. As an aside, I've been trying to write a test that doesn't require user interaction that demonstrates the issue, but I've not succeeded at that yet.

At least with that test case submitted you'll constantly be nagged to find a solution. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jan 04, 2012
Nathan Hammond nathanhammond Change discussed in http://bugs.jqueryui.com/ticket/7983 41eb4d6
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 ui/jquery.ui.draggable.js
4 ui/jquery.ui.draggable.js
@@ -400,7 +400,7 @@ $.widget("ui.draggable", $.ui.mouse, {
400 400 pos.top // The absolute mouse position
401 401 + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
402 402 + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
403   - - ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
  403 + - ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode && !$.browser.mozilla ? 0 : scroll.scrollTop() ) ) * mod)
404 404 ),
405 405 left: (
406 406 pos.left // The absolute mouse position
@@ -460,7 +460,7 @@ $.widget("ui.draggable", $.ui.mouse, {
460 460 - this.offset.click.top // Click offset (relative to the element)
461 461 - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
462 462 - this.offset.parent.top // The offsetParent's offset without borders (offset + border)
463   - + ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
  463 + + ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode && !$.browser.mozilla ? 0 : scroll.scrollTop() ) ))
464 464 ),
465 465 left: (
466 466 pageX // The absolute mouse position

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.