From eaca084503dd7d387f32ae1ecc01b46de1e84b36 Mon Sep 17 00:00:00 2001 From: Alain Plantec Date: Thu, 4 Jan 2024 00:35:06 +0100 Subject: [PATCH] polished cursorElement management --- src/Album/AlbInfiniteEditorElement.class.st | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Album/AlbInfiniteEditorElement.class.st b/src/Album/AlbInfiniteEditorElement.class.st index 70d4d44..1ef1ea3 100644 --- a/src/Album/AlbInfiniteEditorElement.class.st +++ b/src/Album/AlbInfiniteEditorElement.class.st @@ -94,7 +94,7 @@ AlbInfiniteEditorElement >> cursorColor: aColor [ { #category : #'accessing - cursor' } AlbInfiniteEditorElement >> cursorElement [ - ^ cursorElement startBlinkingTask; yourself + ^ cursorElement ] { #category : #'private - accessing editor' } @@ -361,14 +361,18 @@ AlbInfiniteEditorElement >> onExtentChanged [ AlbInfiniteEditorElement >> onGotFocus [ self editor onGotFocus. - self cursorElement ifNotNil: [ :c | c onGotFocus ] + self cursorElement onGotFocus. + self cursorElement hasParent ifFalse: [ + self selecter + from: 0 to: 0; + select ] ] { #category : #'focus accessing' } AlbInfiniteEditorElement >> onLostFocus [ self editor onLostFocus. - self cursorElement ifNotNil: [:ce | ce onLostFocus] + self cursorElement onLostFocus ] { #category : #'hooks - scrolling' }