Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1280.mcz==================== Summary ====================
Name: Morphic-mt.1280
Author: mt
Time: 15 August 2016, 4:57:23.517962 pm
UUID: 09e63037-831a-d642-8db7-cd46a50e8004
Ancestors: Morphic-mt.1279
Found another "dark corner" in NewParagraph. Flagged for later refactoring.
Fixes a serious bug that occured when you click on a text link with "Windows Are Always Active" disabled. Should work now.
=============== Diff against Morphic-mt.1279 ===============
Item was changed:
----- Method: NewParagraph>>clickAt:for:controller: (in category 'editing') -----
clickAt: clickPoint for: model controller: editor
"Give sensitive text a chance to fire. Display flash: (100@100 extent: 100@100)."
| startBlock action |
action := false.
startBlock := self characterBlockAtPoint: clickPoint.
(text attributesAt: startBlock stringIndex forStyle: textStyle)
do: [:att | | range target box boxes |
att mayActOnClick ifTrue:
[(target := model) ifNil: [target := editor morph].
range := text rangeOf: att startingAt: startBlock stringIndex.
boxes := self selectionRectsFrom: (self characterBlockForIndex: range first)
to: (self characterBlockForIndex: range last+1).
box := boxes detect: [:each | each containsPoint: clickPoint] ifNone: [nil].
box ifNotNil:
[ box := (editor transformFrom: nil) invertBoundsRect: box.
editor morph allOwnersDo: [ :m | box := box intersect: (m boundsInWorld) ].
+ self flag: #fix. "mt: Make it stateful and with real events."
Utilities awaitMouseUpIn: box
repeating: []
ifSucceed: [(att actOnClickFor: target in: self at: clickPoint editor: editor) ifTrue: [action := true]].
Cursor currentCursor == Cursor webLink ifTrue:[Cursor normal show].
]]].
^ action!
Item was changed:
----- Method: TextEditor>>mouseDown: (in category 'events') -----
mouseDown: evt
"An attempt to break up the old processRedButton code into threee phases"
| clickPoint b |
oldInterval := self selectionInterval.
clickPoint := evt cursorPoint.
b := paragraph characterBlockAtPoint: clickPoint.
(paragraph clickAt: clickPoint for: model controller: self) ifTrue: [
markBlock := b.
pointBlock := b.
evt hand releaseKeyboardFocus: morph.
+ evt hand releaseMouseFocus: morph.
^ self ].
evt shiftPressed
ifFalse: [
self closeTypeIn.
markBlock := b.
pointBlock := b ]
ifTrue: [
self closeTypeIn.
self mouseMove: evt ].
self storeSelectionInParagraph!