NSTextField focus ring breaks with setFrameCenterRotation:
| Originator: | ewmailing | ||
| Number: | rdar://12258849 | Date Originated: | 2012-09-07 |
| Status: | Open | Resolved: | |
| Product: | Mac OS X | Product Version: | 10.8 |
| Classification: | Serious Bug | Reproducible: | Always |
07-Sep-2012 04:53 PM Eric Wing: Summary: I am trying to rotate an NSTextField with setFrameCenterRotation. The blue focus ring does not rotate with the view when I rotate it. The focus ring remains where it was which makes it look like a terrible rendering glitch/bug. Steps to Reproduce: Attached is a demo project with a TextField, TextView and Button. Type some text in the TextField and leave the focus on the TextField. Click the button to rotate everything 90 degrees. Expected Results: Everything should rotate 90 degrees and look perfect. Actual Results: The blue focus ring fails to rotate but everything else does. Regression: I think this was broken as far back as 10.5. I'm pretty sure I filed a bug on this circa 2007 but I can't find it. (A bunch of my bugs disappeared.) Notes: We are trying to do interesting things with Core Animation on both iOS and Mac. The following video demonstrates putting UIWebViews and AVPlayerLayers in host views and tying them to Box2D physics models. The views collide and bounce and rotate according to physics while they are doing stuff. This technique can be extended to any view as long as Core Animation works correctly. http://yfrog.com/j0d66z We are trying to get the Mac side to catch up with the iOS side for our product. The iOS side works much better. We keep hitting a lot of bugs and limitations on the Mac side. In this case, it is very cool that text entry and rendering do work correctly in this case and only the focus ring is broken. TextView was a little non-obvious to me that I had to rotate the encompassing scrollview, but it kind of makes sense in hindsight. It's nice that that one works. Mac layer-backed WebView is my nemesis and I have many bugs on that one going back to 2005. 10-Sep-2012 12:08 PM Eric Wing: This is a minor thing, but I forgot to enable layer backing on the textfield,view,button. The layerbacking is enabled on the contentView and my understanding is that these things are supposed to automatically enabled if the parent view is enabled, though to me it looks like this wasn't actually the case. TextView actually seems to have rendering problems once layer backing is enabled. I will file a different bug on this one. TextField seems to behave mostly the same, though I noticed one glitch where the white background didn't rotate in one case, but I was unable to reproduce. RotateTextView uploaded at https://github.com/ewmailing/MyAppleBugs
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!