[squeak-dev] The Trunk: Morphic-ct.2054.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Nov 25 17:03:44 UTC 2022
Christoph Thiede uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.2054.mcz
==================== Summary ====================
Name: Morphic-ct.2054
Author: ct
Time: 25 November 2022, 6:03:40.232495 pm
UUID: 50a95075-43f1-024e-ba2f-c74863e21f26
Ancestors: Morphic-mt.2053
Fixes dangling keyboard focus for children of deleted morphs.
Thanks to Robert (rhi) for the original bug report and to Marcel (mt) for the solution!
=============== Diff against Morphic-mt.2053 ===============
Item was changed:
----- Method: HandMorph>>releaseKeyboardFocus: (in category 'focus handling') -----
releaseKeyboardFocus: aMorph
"If the given morph had the keyboard focus before, release it"
self keyboardFocus == aMorph keyboardFocusDelegate
+ ifTrue: [self releaseKeyboardFocus].
+
+ "Also release the keyboard focus for any child of aMorph."
+ self keyboardFocus ifNotNil: [:focus |
+ "like #hasOwner:, but identity instead of equality comparison"
+ focus allOwnersDo: [:m |
+ m == aMorph ifTrue: [
+ ^ self releaseKeyboardFocus]]].!
- ifTrue:[self releaseKeyboardFocus].!
More information about the Squeak-dev
mailing list
|