PopUpView.st
changeset 8658 c7254c6b2add
parent 8274 84c74b21c9a7
child 8766 ae9a2a2d9ba9
--- a/PopUpView.st	Thu Mar 07 15:11:48 2019 +0100
+++ b/PopUpView.st	Thu Mar 07 15:12:35 2019 +0100
@@ -214,6 +214,8 @@
     previousKeyboardGrab := device activeKeyboardGrab.
 "/ Transcript show:'k-ggg by '; show:self; show:'[',self identityHash printString,']'; showCR:' - previous is ' , previousKeyboardGrab printString.
     ^ super grabKeyboard
+
+    "Modified (format): / 07-03-2019 / 14:14:42 / Stefan Vogel"
 !
 
 grabPointerWithCursor:aCursorOrNil
@@ -223,11 +225,15 @@
 !
 
 ungrabKeyboard
+
 "/ Transcript show:'k-uuu by '; show:self; show:'[',self identityHash printString,']'; showCR:' - previous is ' , previousKeyboardGrab printString.
     super ungrabKeyboard.
-    previousKeyboardGrab notNil ifTrue:[
+    (previousKeyboardGrab notNil
+     and:[previousKeyboardGrab realized]) ifTrue:[
         device grabKeyboardInView:previousKeyboardGrab
     ].
+
+    "Modified (format): / 07-03-2019 / 14:34:37 / Stefan Vogel"
 !
 
 ungrabPointer