Coming back to the suggestion from comment #25 and looking in nsFrame::HandlePress.
I traced it down into ns[Text]Frame::GetChildFrameContainingOffset with a call stack of: nsFrame::GetChildFrameContainingOffset *or* nsTextFrame::GetChildFrameContainingOffset nsFrameSelection::GetFrameForNodeOffset nsFrameSelection::BidiLevelFromClick nsFrameSelection::HandleClick nsFrame::HandlePress It varies whether nsFrame::GetChildFrameContainingOffset or nsTextFrame::GetChildFrameContainingOffset is being called depending on whether you click on the text, but almost to the left of the text, or completely to the left of the text. When the nsTextFrame::GetChildFrameContainingOffsetAny version is called, it offset is calculated correctly and the font is right. When the nsFrame::GetChildFrameContainingOffset is called, the font is wrong. In the latter case the caret still appears behind the text. Try it with a wide letter, like "m"! So in case a "Frame" being hit instead of a "TextFrame", perhaps the program should look whether there is a text right before the caret once placed. Here some debug showing the two cases: === before BidiLevelFromClick === in nsTextFrame::GetChildFrameContainingOffset nsTextFrame::GetChildFrameContainingOffset, offset=3 === after BidiLevelFromClick === before BidiLevelFromClick === in nsFrame::GetChildFrameContainingOffset === after BidiLevelFromClick Any further hints? Five minutes of your time can possibly save me five hours or five days of "reverse engineering". -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/584632 Title: composer changes font mid email To manage notifications about this bug go to: https://bugs.launchpad.net/thunderbird/+bug/584632/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs