From ba6129c224c62d0a59f3adf391605345468cf6ef Mon Sep 17 00:00:00 2001 From: Nicola Pero Date: Fri, 16 Jun 2000 19:03:15 +0000 Subject: [PATCH] Don't scroll rect to visible if we are text fields. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6708 72102866-910b-0410-8b05-ffd578937521 --- Source/NSText.m | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Source/NSText.m b/Source/NSText.m index 9bfd3629f..1dbd3329d 100644 --- a/Source/NSText.m +++ b/Source/NSText.m @@ -2111,13 +2111,19 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet) - (void) scrollRangeToVisible: (NSRange) aRange { - [self scrollRectToVisible: - NSUnionRect ([self rectForCharacterIndex: - _selected_range.location], - [self rectForCharacterIndex: - NSMaxRange (_selected_range)])]; + // Don't try scrolling an ancestor clipview if we are field editor. + // This makes things so much simpler and stabler for now. + if (_tf.is_field_editor == NO) + { + [self scrollRectToVisible: + NSUnionRect ([self rectForCharacterIndex: + _selected_range.location], + [self rectForCharacterIndex: + NSMaxRange (_selected_range)])]; + } } + /* * Managing the Delegate */