Mouse click gets wrong coordinates in the Scrollviews document view after autoscroll #1675

Closed
kerusan opened this Issue Sep 20, 2012 · 3 comments

Projects

None yet

3 participants

@kerusan

Mouse click gets wrong coordinates in the Scrollviews document view after autoscroll to a textfield outside the scrollviews visible rect.

I'm setting up a scrollview in the window that autosizes to the windows rect. In the document view I set up some textfields that are connected with the nextKeyView outlet. If sizing the window smaller than the document view and then using the tab key to tab to a textfield outside of of the scrollview's visible rect, making the scrollview autoscroll to that textfield, the hit point when clicking in the scrollview gets wrong coordinates. The coordinates given is not scrolled in the document views coordinate system. If clicking in the top left corner the hit point returned is the top left corner of the document view. The offset scrolled in not added.

I have made a little test app on the url http://www.kerusan.org/Cappuccino/resources/KeyViewTest/ and it is called KeyViewTest.

An easy way to see the bug is to start the application,
1) make the browser's window so small it only shows the popup button and two of the textfields,
2) then click in the first textfield (no 1) and using the tab-key go down to the fourth textfield (no 4).
3) Now click with the mouse on the top visible textfield (no 2) and the popup buttons items will show up.

The MainMenu.xib file can be found in http://www.kerusan.org/Cappuccino/resources/KeyViewTest/Resources/

I have no fixes for this issue, sorry.

This is tested in MacOSX 10.8.1, using all kinds of browser Standard Safari, Webkit Safari, Crome, Firefox and Opera, all latest versions. Cappuccino version used is 0.9.6-RC2. XCode used is 4.4.1.

I cant see any other issue that informs about this behavior but it may have relations to an issue called
'CPScrollView adjusts documentView's origin incorrectly on CPScrollView resize'.

Please feel free to contact me if something is unclear at keusan@gmail.com or kerusan@mac.com.

@cappbot

Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.

@mrcarlberg mrcarlberg added a commit to mrcarlberg/cappuccino that referenced this issue Sep 28, 2012
@mrcarlberg mrcarlberg Make sure the text field is visible before focus so the browser
will not scroll without the NSScrollView knowing about it
Issue #1675 and maybe a little of issue #1301
This fix will not work without pull
request #1678 - Fixed scrollRectToVisible in CPView
182f4c3
@ahankinson

@kerusan could you make a download of your test application available? Thanks.

I'm also going to close this as a duplicate of #1679.

+#duplicate
+bug
+AppKit

@cappbot

Milestone: Someday. Labels: #duplicate, AppKit, bug. What's next? This issue duplicates another existing issue. Refer to the duplicate issue for further information.

@cappbot cappbot closed this Feb 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment