[squeak-dev] The Inbox: Morphic-ct.1585.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Nov 10 15:01:52 UTC 2019


A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1585.mcz

==================== Summary ====================

Name: Morphic-ct.1585
Author: ct
Time: 10 November 2019, 4:01:42.092559 pm
UUID: 9564d2b2-4af1-044b-96fd-532e60252fd7
Ancestors: Morphic-mt.1584

TextEditor: Don't change the cursor position after a text action has been performed. This keeps a possible selection stable after you, for example, followed a link.

=============== Diff against Morphic-mt.1584 ===============

Item was changed:
  ----- Method: TextEditor>>mouseDown: (in category 'events') -----
  mouseDown: evt 
  	"Either 1) handle text actions in the paragraph, 2) begin a text drag operation, or 3) modify the caret/selection."
  	
  	| 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 ].
  	
  	(morph dragEnabled and: [self isEventInSelection: evt]) ifTrue: [
  		evt hand
  			waitForClicksOrDrag: morph
  			event: evt
  			selectors: {#click:. nil. nil. #startDrag:}
  			threshold: HandMorph dragThreshold.
  		morph setProperty: #waitingForTextDrag toValue: true.
  		^ self].
  	
  	evt shiftPressed
  		ifFalse: [
  			self closeTypeIn.
  			markBlock := b.
  			pointBlock := b ]
  		 ifTrue: [
  			self closeTypeIn.
  			self mouseMove: evt ].
         self storeSelectionInParagraph!



More information about the Squeak-dev mailing list