Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #5017 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

[PATCH] Check whether draggable is child of options.scroll

Reported by: tomg@byu.net Assigned to: thomas@fesch.at
Priority: normal Milestone:
Component: script.aculo.us Version:
Severity: normal Keywords:
Cc:

Description

The current draggable.js (rev. 4230) assumes the Draggable is a child of the element defined in options.scroll, and modifies the position of the Draggable as it scrolls the element. This is incorrect behavior if the Draggable is not a child of the scrollable.

Added a check on init, created "private" boolean Draggable._isScrollChild; if true, the Draggable's position should be adjusted along with the scroll.

Verified proper behavior following patch in Firefox 1.5.0.3/OS X and Safari 2.0.3/OS X. Unit tests not performed.

Attachments

parent_of_draggable.diff (2.2 kB) - added by tomg@byu.net on 05/09/06 16:33:09.
PATCH
scroll_test.htm (5.1 kB) - added by tomg@byu.net on 06/20/06 15:43:45.
Functional test

Change History

05/09/06 16:33:09 changed by tomg@byu.net

  • attachment parent_of_draggable.diff added.

PATCH

06/20/06 09:26:08 changed by madrobby

Any functional tests for this?

06/20/06 15:43:45 changed by tomg@byu.net

  • attachment scroll_test.htm added.

Functional test

06/20/06 15:49:36 changed by tomg@byu.net

Probably not the best test (could be more of a minimal test), but it demonstrates this problem, #5035, and #5174 (same symptoms as #4317, #3860).

Resize your window until the right pane scrolls, but the left does not. Drag elements on the left to containers on the right.

06/20/06 15:57:38 changed by tomg@byu.net

I should also add that the symptoms in the scroll position bugs (#5174, #4317, #3860) may be avoided in this example by the patch in #4202. The patch requires an additional option--perhaps a route you wish to avoid in favor of a more general solution--although it resolves the scroll position symptoms for this example.

08/18/06 13:01:04 changed by tomg@byu.net

Allow me to clarify: The patch at #4204 requires an additional option. This patch does not.

See also #5518.

08/18/06 14:15:16 changed by madrobby

  • status changed from new to closed.
  • resolution set to fixed.

Added with [4785]. I'd welcome success reports and the various other related tickets (close them if they're fixed, too).