Closed BlairDuncan closed 14 years ago
Interesting... It would be nice to know what is causing this in webkit... I guess the only thing now is to make sure isSelectable returns yes if you setEditable for NSTextField. I would assume yes... One more test to see what happens when you setSelectable:NO then setEditable:YES, then test once more whenyou setEditable:NO again.
Yes, that is why selectable should only get set to YES when it is being set as editable.
This is explained in the NSTextField docs ...For example, if an NSTextField object is selectable but not editable, then made editable for a time, then made not editable, it remains selectable. To guarantee that text is neither editable nor selectable, simply use setSelectable: to turn off selectability.
Thanks, I'll grab this when I get a chance.
Pulled, thanks! :)
This may be browser specific, but it happens in Safari and has bugged me for some time.
If you never setSelectable:YES the cursor will not flash - even though its been made editable.
The docs for NSTextField for setEditable say: ... If YES, then the user is allowed to both select and edit text. If flag is NO, then the user isn’t permitted to edit text, and the receiver’s selectability is restored to its previous value.
So the fix is to simply add setSelectable:YES to the setEditable method.