Bug 16960 - webView:decidePolicyForNavigationAction:request:frame:decisionListener returns incorrect value for WebActionElementKey -> WebElementDOMNode key in policy when the frame's scroll position is different than the initial value
Summary: webView:decidePolicyForNavigationAction:request:frame:decisionListener return...
Status: RESOLVED DUPLICATE of bug 15780
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac (Intel) OS X 10.4
: P2 Normal
Assignee: Nobody
URL: None
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-21 10:59 PST by Benjamin Jackson
Modified: 2008-01-22 06:02 PST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Jackson 2008-01-21 10:59:37 PST
I have a delegate set up to catch links when the user clicks them in a WebView.

This delegate pulls the value of [[policy objectForKey:@"WebActionElementKey"] objectForKey:@"WebElementDOMNode"] to determine the node which was clicked, then executes an action based on the result.

If the user scrolls the WebView down one or more lines, the WebView appears to not take into account the vertical offset caused by the scrolling, and instead of containing the node of the link which was clicked, the dictionary contains the node which would be returned if the user had clicked above the area which was actually clicked.

This bug is consistently reproduceable.
Comment 1 Mark Rowe (bdash) 2008-01-21 19:10:19 PST
This is a duplicate of bug 15780.

Unrelated to the bug, but note that WebActionElementKey and WebElementDOMNode are named constants so you should be calling [[policy objectForKey:WebActionElementKey]
objectForKey:WebElementDOMNode] rather than using them as string literals.

*** This bug has been marked as a duplicate of 15780 ***
Comment 2 Benjamin Jackson 2008-01-22 06:02:53 PST
Thanks Mark, apologies for the duplicate. Glad to see it's fixed :)