Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPTableView / CPClipView does not scroll when dragging #614

Closed
dtsitses opened this issue Apr 18, 2010 · 11 comments
Closed

CPTableView / CPClipView does not scroll when dragging #614

dtsitses opened this issue Apr 18, 2010 · 11 comments

Comments

@dtsitses
Copy link

If method [CPTableView tableView: validateDrop: proposedRow: proposedDropOperation:] sets the drop row to be a few rows > or < than the current visible rows, then dragging the row towards the visible bounds of the table does not auto-scroll to the next available drop position.

Result: it is not possible to drop the row to a valid index

How to replicate:

  • Create a table with 20 rows, and adjust its height so that only half of the rows are visible.
  • Configure scrolling to allow drops on every row, by setting [aTableView setDropRow:row dropOperation:CPTableViewDropAbove];
  • Notice that when dragging beyond the table's visible bounds, the table scrolls correctly
  • Now, set the table to allow drops every 3 rows, like so: [aTableView setDropRow:row+3 dropOperation:CPTableViewDropAbove];
  • Scroll to the middle of the table, so that there are 5 invisible rows above, and 5 below
  • Pick a row and start dragging towards the bounds of the table.
  • Notice that the table no longer scrolls to the next valid index, in either direction

Tested on *master with code pulled on 2010-04-12

@cacaodev
Copy link
Contributor

I don't see the bug when dragging down, only up. But in both cases, in the code, we should definitely scroll by ±= _rowHeight instead of scrolling to the next targeted row.

@boucher
Copy link
Member

boucher commented Apr 21, 2010

Duplicate of http://github.com/280north/cappuccino/issues#issue/296 but I'm closing that one since this is more descriptive.

@dtsitses
Copy link
Author

I did some further investigation on this, it appears that on a simple table that just allows items to be dropped every 3 rows, i.e. when (row % 3 == 0), the problem does not appear (unless the table's height is about 100px, with cells 45px tall - in that case, autoscroll while dragging upwards doesn't work).

The table which I originally observed the problem on uses variable view types per row, which views also implement [drawRect:]. There are also some other complexities on that table. When testing on that table, autoscroll when dragging only works if the allowed drop position is a cell away into the clipped area. However when the allowed drop position is further away, i.e. when (row % 3 == 0), then the drag won't autoscroll. Dropping the item in the desired position is impossible.

I'll investigate further when I get the chance, and will try to isolate the configuration that's causing the problem to surface. I'll update the issue again and include a test table demonstrating the problem.

@Me1000
Copy link
Contributor

Me1000 commented May 17, 2010

Is this still a problem?

@dtsitses
Copy link
Author

just tested after a fresh pull, problem persists

@boucher
Copy link
Member

boucher commented May 18, 2010

since there seems to be a lot of ambiguity here, can you please just provide some sample code for testing purposes?

@dtsitses
Copy link
Author

I managed to isolate the problem - apparently it is very simple to replicate and does not require any of the steps described above, the fact that it was occurring on a table of the described structure and functionality was a coincidence.

To replicate, just create a table with a bunch of rows and set [scrollView setHasVerticalScroller:NO]; Now dragging an item below or above the visible rows does not cause auto-scroll.

Now this obviously sounds kinda dumb… why would I expect a table with no scroller to auto-scroll?? Well, up to now I hadn't even realized that there was no scroller: the thing scrolls with my mouse wheel and with touch gestures, so when I drag an item I also expect it to scroll. I suppose the question is, what does setHasVerticalScroller:NO mean? Does it mean that there is no vertical scroll functionality, or just that the scroller is not visible. Current user experience feels like that latter I think.

Have a .zip sample app demonstrating the issue, will find a place to upload it if required

@cappbot
Copy link

cappbot commented May 9, 2012

Milestone: 1.0. Labels: #needs-confirmation, #needs-patch, AppKit, bug. What's next?

  • This issue needs a volunteer to write and submit code to address it.
  • This issue needs a volunteer to independently reproduce the issue.

@daboe01
Copy link
Contributor

daboe01 commented Jul 26, 2014

a scroll view without a scroller should indeed not autoscroll.
so this is not an issue, isn't it?
+#wont-fix

@cappbot
Copy link

cappbot commented Jul 26, 2014

Milestone: 1.0. Labels: #wont-fix, AppKit, bug. What's next? A reviewer or core team member has decided against acting upon this issue.

@cappbot cappbot closed this as completed Jul 26, 2014
@cappbot
Copy link

cappbot commented Jul 26, 2014

Milestone: 1.0. Labels: #wont-fix, AppKit, bug. What's next? A reviewer or core team member has decided against acting upon this issue.

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

No branches or pull requests

6 participants