This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients gvanrossum, markroseman, ned.deily, rhettinger, ronaldoussoren, serhiy.storchaka, terry.reedy, wordtech
Date 2015-08-20.05:46:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1440049571.33.0.73099347139.issue24893@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-08-20 05:46:11terry.reedysetrecipients: + terry.reedy, gvanrossum, rhettinger, ronaldoussoren, wordtech, ned.deily, markroseman, serhiy.storchaka
2015-08-20 05:46:11terry.reedysetmessageid: <1440049571.33.0.73099347139.issue24893@psf.upfronthosting.co.za>
2015-08-20 05:46:11terry.reedylinkissue24893 messages
2015-08-20 05:46:09terry.reedycreate