<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        "<span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">preferredPosition isMorph" ... this is kind of a badly smelling piece of code there ;-)</span><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Best,</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Marcel</span></div><div class="mb_sig"></div><blockquote class='history_container' type='cite' style='border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;'>
                        <p style='color: #AAAAAA; margin-top: 10px;'>Am 06.04.2022 20:16:52 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style='font-family:Arial,Helvetica,sans-serif'>Christoph Thiede uploaded a new version of Morphic to project The Trunk:<br>http://source.squeak.org/trunk/Morphic-ct.1961.mcz<br><br>==================== Summary ====================<br><br>Name: Morphic-ct.1961<br>Author: ct<br>Time: 6 April 2022, 8:16:10.262385 pm<br>UUID: a733d275-2b98-5d4c-837c-9eb9c90912ab<br>Ancestors: Morphic-ct.1960<br><br>Tweaks default keyboard focus in dialog windows. Makes sure that for "fill in the blank" dialogs, users can type into the text field even it is not hovered initially. For system windows, avoid focusing a locked morph and beautifies the morph search by using a chained sort function.<br><br>=============== Diff against Morphic-ct.1960 ===============<br><br>Item was added:<br>+ ----- Method: DialogWindow>>defaultFocusMorph (in category 'accessing') -----<br>+ defaultFocusMorph<br>+ <br>+   (preferredPosition isMorph and: [preferredPosition wantsKeyboardFocus]) ifTrue: [^ preferredPosition].<br>+       <br>+     ^ nil!<br><br>Item was changed:<br>  ----- Method: DialogWindow>>getUserResponse (in category 'running') -----<br>  getUserResponse<br>  <br>         | hand world |<br>        self message ifEmpty: [messageMorph delete]. "Do not waste space."<br>          self paneMorph submorphs<br>              ifEmpty: ["Do not waste space and avoid strange button-row wraps."<br>                          self paneMorph delete.<br>                        self buttonRowMorph wrapDirection: #none]. <br>   <br>      hand := self currentHand.<br>     world := self currentWorld.<br>  <br>       self fullBounds.<br>      self morphicLayerNumber: self class dialogLayer.<br>      self moveToPreferredPosition.<br>         self openInWorld: world.<br>      <br>      hand showTemporaryCursor: nil. "Since we are out of context, reset the cursor."<br>     <br>      hand keyboardFocus in: [:priorKeyboardFocus |<br>                 hand mouseFocus in: [:priorMouseFocus |<br>                       self exclusive ifTrue: [hand newMouseFocus: self].<br>+                   hand newKeyboardFocus: self defaultFocusMorph.<br>-                       hand newKeyboardFocus: self.<br>  <br>                      [[self isInWorld] whileTrue: [world doOneSubCycle]]<br>                           ifCurtailed: [self cancelDialog].<br>  <br>                         hand newKeyboardFocus: priorKeyboardFocus.<br>                    <br>                      self flag: #discuss. "Since 2016 we are having this *ping pong* between (a) restoring the prior mouse focus and (b) just clearing it globally. The former solution makes more sense while the latter fixes issues with some modal dialogs. We have to investigate this further."<br>                    hand releaseMouseFocus.<br>                       "hand newMouseFocus: priorMouseFocus."]].<br>  <br>       ^ result!<br><br>Item was added:<br>+ ----- Method: FillInTheBlankMorph>>defaultFocusMorph (in category 'accessing') -----<br>+ defaultFocusMorph<br>+ <br>+  ^ self textPane!<br><br>Item was changed:<br>  ----- Method: SystemWindow>>defaultFocusMorph (in category 'focus') -----<br>  defaultFocusMorph<br>  <br>     | predicate |<br>         predicate := (self hasProperty: #defaultFocusMorph)<br>+          ifFalse: [ [:morph | morph isLocked not and: [morph wantsKeyboardFocus]] ]<br>-           ifFalse: [ [:morph | morph wantsKeyboardFocus] ]<br>              ifTrue: [ | anObject |<br>                        anObject := (self valueOfProperty: #defaultFocusMorph) value.<br>                         anObject isMorph ifTrue: [^ anObject].<br>                        [:morph | morph knownName = anObject] ].<br>+     <br>- <br>          self<br>                  allMorphsBreadthFirstDo: [:morph | (predicate value: morph) ifTrue: [^ morph]]<br>+               sorted: #top ascending, #left ascending.<br>+     <br>-             sorted: [:a :b | a top < b top or: [a top = b top and: [a left <= b left]]].<br>- <br>        ^ nil!<br><br><br></div></blockquote>
                                        </div></body>