WebUIDelegate(contextMenuItemsForElement) conflicts with "Inspect Element" - cocoa

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.

Related

Did the Dock Hierarchy changed with Mavericks ?

I'm having some trouble on making an app compatible with Mavericks.
I was wondering : Did Apple change something in the UI element hierarchy for the Dock ?
Here is what I have on Mavericks using Accessibility Inspector
I guess not. This is what I get with Mountain Lion (v10.8.5):

Accessibility broken with Preview.app in OS X 10.8.4?

We have an application that integrates with different programs (among which is the Preview.app) using accessibility. We use the AXUIElementSetAttributeValue function to programmatically select some text in a PDF document using the kAXSelectedTextRangeAttribute. This used to work fine but suddenly stopped on my Mac (nothing seems to happend). My co-worker doesn't have the issue so after trying to figure out the difference I remembered that I had just updated to OS X 10.8.4 while he hasn't. I then read about this update and among the features and fixes was the following:
Improves VoiceOver compatibility with text in PDF documents
This indicates to me that they have fiddled with the area where I am having the issue. My question is now weather this is simply a bug or if it is by design. In the case of the latter, what am I supposed to use in stead?
PS. We tried also setting the selection range using the Accessibility Inspector found under Developer tools in Xcode and it works fine in 10.8.2 but not in 10.8.4, which further indicates that this might be a bug.
This is indeed a bug. I just installed the developer preview of OS X 10.8.5 and the issue has been resolved here. In the change-log it also says that some of the changes in this version regard "PDF viewing and Accessibility".

NSTableView weird scrolling behavior in Mountain Lion

I have an app with a source list. In Lion, it works wonderfully. In Mountain Lion, it works fine, but there's an unwanted side effect. Whenever the selected row changes in the source list, Mountain Lion will scroll that row to the top of the scroll view. This happens whether the change happens due to a click or via code. As I said, it doesn't happen in Lion, only Mountain Lion.
Has anyone experienced anything like this themselves?

applicationShouldHandleReopen is no longer called in Lion/XCode 4.1

I've just installed OS X Lion and XCode 4.1.
I have an app that opens the last used document automatically at startup. To do so I have implemented applicationShouldHandleReopen.
This app used to launch fine from XCode 4.0.2 on Snow Leopard.
After I compiled my app with XCode 4.1 it stopped working.
I put a break point inside applicationShouldHandleReopen, but it never breaks unless I click on the app icon on dock.
When I double click the app in Finder as opposed to running it from XCode 4.1, it works as expected; it launches the last document, meaning applicationShouldHandleReopen must have been called at startup.
Any ideas what happened? What should I do to bring back the old behavior?
Or do you think this is a bug in XCode 4.1?
Thanks
This is no longer an issue. I don't observe this behavior any more.

Embed Safari's Webinspector in Browserwindow as default

Is there an attribute (in com.apple.Safari.plist?) to embed the Webinspector when it is opened (via [CMD]+[ALT]+[I] / [Developer]->[Show Webinformation]) as default?
Mac OSX Lion 10.7, Safari: 5.1
Since i updated, the Inspector won't stay popped-in.
At the time of SnowLeopard, i might have configured the SafariDefaults, but i already read the defaults via
default read com.apple.Safari
and didn't find a relevant attribute.
Looks like this was a known bug and has been fixed in the latest build of WebKit.
https://bugs.webkit.org/show_bug.cgi?id=65493
Also confirmed it myself with Nightly Build revision 94958. Hopefully it will make it into a new version of Safari soon!

Resources