Terry J. Reedy added the comment: Guido, we are looking at the PyCon 2014 keynote video where the text cursor was misplaced relative to the mouseclick, trying to guess the reason. Do you still have the Mac laptop you used? If so, have you upgraded its python?
The hideous moment is at 7:10. Guido clicked after '.split' to position the blinking insert cursor there, to add 'lines' to the method name. There was no reason to select anything. The cursor appeared instead on the blank line 4 lines above. Guido was able to move the text cursor with arrow keys, as normal, to the desired position. Serhiy or Kevin, have either of you seen or heard of this problem? Earlier in the video, there are Display boxes offering resolution choices of 800x600, 1024x768, and 1280x1024. I presume that this indicates 'not Retina'. I suspect the OS or tk they jointly control the text cursor. Minimal code for experiments is: import tkinter as tk root = tk.Tk() text = tk.Text() text.pack() root.mainloop() Running the above on Win7, I tried Mark's experiment. Clicking near the end of a line consistently put the cursor at the end of the line. Clicking near the right edge of the box, at least 50 columns away, consistently put the cursor at the beginning of *some* line, but not necessarily the one 'clicked' on. I looked at idlelib.EditorWindow for anything that might possibly affect tk processing of left button clicks. I only found 2 items. if macosxSupport.isAquaTk(): text.bind("<Control-Button-1>",self.right_menu_event) If the problem were Mac-specific, this might warrant a look. self.text.event_add("<<set-line-and-column>>", "<KeyRelease>", "<ButtonRelease>") The cursor is positioned on buttom press, before release. ---------- assignee: terry.reedy -> components: +Tkinter nosy: +gvanrossum, serhiy.storchaka, wordtech stage: -> test needed title: Idle occasionally gets mouse position wrong for selections -> Tk occasionally mispositions Text() insert cursor on mouse click. _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24893> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com