diff --git a/ChangeLog b/ChangeLog index dc053100a..2e48bf523 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-01-24 Doug Simons + + * Source/NSSearchFieldCell.m (-trackMouse:inRect:ofView:untilMouseUp:): + Pass mouseDown event to the field editor when click is in the field, to + select at the correct point in the text. + 2011-01-24 Wolfgang Lux * Source/NSWindow.m (-setFrameFromString:, -stringWithSavedFrame): diff --git a/Source/NSSearchFieldCell.m b/Source/NSSearchFieldCell.m index bc1916e89..4b8c2f39d 100644 --- a/Source/NSSearchFieldCell.m +++ b/Source/NSSearchFieldCell.m @@ -424,6 +424,15 @@ untilMouseUp: untilMouseUp]; } + NSText *currentEditor = ([controlView isKindOfClass:[NSControl class]] + ? [(NSControl *)controlView currentEditor] + : nil); + if (currentEditor) + { + [currentEditor mouseDown: event]; + return YES; + } + return [super trackMouse: event inRect: [self searchTextRectForBounds: cellFrame] ofView: controlView