NSTextView does not respect underline color in linkTextAttributes

Originator:lithium3141
Number:rdar://13753435 Date Originated:26-Apr-2013 04:03 PM
Status:Open Resolved:
Product:OS X SDK Product Version:OS X 10.8.3 (12D78)/Xcode 4.6.2 (4H1003)
Classification:Other Bug Reproducible:Always
 
26-Apr-2013 04:03 PM Tim Ekl:
Summary: When drawing links, NSTextView will ignore the value for NSUnderlineColorAttributeName in a dictionary passed to -setLinkTextAttributes:, and will instead always use the foreground color to draw the underline.

Steps to Reproduce:
1. Create a new Cocoa application.
2. Add an NSTextView to the main window. Turn on Smart Links.
3. Call -setLinkTextAttributes: on the text view, providing (at least) a unique color for NSUnderlineColorAttributeName and @(NSUnderlineStyleSingle) for NSUnderlineStyleAttributeName.
4. Run the app and enter a link into the text view.

Expected Results: The link is detected and styled with a colored underline.

Actual Results: The link is detected and underlined, but the underline color remains black.

Regression: Unknown.

Notes: Sample app forthcoming; follow step 4 above.



26-Apr-2013 04:13 PM Tim Ekl:
Sample project attached.

26-Apr-2013 04:13 PM Tim Ekl:
'TextViewUnderlineColor.zip' was successfully uploaded

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!