I was developing an app for Mac OS X. I migrated to OSX 10.8 yesterday and found that WebView’s “Inspect Element” is no longer usable. With the same source repo which works well under 10.7 LION, the new build just shows menuitem there but do nothing after clicking. I dug for a while and found that my implementation of WebUIDelegate cause this problem (in 10.8 mountain lion ONLY)
Even this won’t work:
- (NSArray *)webView:(WebView *)sender
contextMenuItemsForElement:(NSDictionary *)element
defaultMenuItems:(NSArray *)defaultMenuItems
{
return defaultMenuItems;
};
If I comment the whole function above, that “inspect element” does work well.
I don’t know if this is a bug or there is anything that I missed.
I believe you’re running in to a symptom of the issue described in WebKit bug 89323. It was fixed in Safari 6.0.2.