← Back to team overview

desktop-packages team mailing list archive

[Bug 584632]

 

Sorry to trouble you again. I have some more questions to understand how
the architecture hangs together. Let me summarise the questions from the
previous posts here:

Where is the mouse click translated into identifying a node of the DOM tree?
Your answer was nsFrame::HandlePress. I looked through there in the debugger but didn't see anything connected to the editor. nsFrame::HandlePress handles clicks anywhere on the mail composition window. I would like to find the spot where the editor looks through the DOM tree to identify the node. I looked in nsHTMLEditorEventListener::MouseDown, but in there only the very last branch controlled by "else if (!isContextClick && buttonNumber == 0 && clickCount == 1)" is executed. I would imagine to find a traversal of the DOM tree to find the correct node.

How does Thunderbird communicate "composition font" or "default font" to the editor?
Your answer was that you didn't know. Fair enough. You suggested the document.execCommand could be used. Assuming that this is implemented in nsHTMLDocument::ExecCommand, I set a breakpoint which wasn't reached. Equally, then the UI controls for bold, italics, font, etc. are operated, the breakpoint wasn't reached. I'd like to know how this is passed to the editor. So I will ask in the Thunderbird group.

When the user writes an e-mail and clicks into a text, the UI controls are updated, that is the indicators for font, bold, italics, etc. reflect the properties of the text where the user clicked.
How is this done? How does the editor notify the UI, after identifying the node clicked and the finding the properties of the node. This is also important to know, because in cases where the font gets lost, the UI is not updated correctly.

And last question just repeated from comment #26. You said in comment #25:
> I _think_ to fix that part you need to get Thunderbird tell Gecko about how
> to format the new paragraph. 

I tried with a <div contenteditable> in Firefox. The editor handles insertion of images by itself. So the question is: How could Thunderbird, the invoker of the editor, be notified, so it could in turn do whatever it does normally (I need to investigate what that is exactly) to communicate that the format required after the insertion? Can an callback be installed that the editor calls when new nodes are created in the DOM tree?
Note: I've just noticed that when an image, math, table, link, etc. is inserted from the "Insert" menu, the composition style is NOT lost. It is only lost when an image is *pasted* in. That's an interesting observation, leading to the question how the system manages to maintain the font in these cases, whereas on paste the font gets lost.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to thunderbird in Ubuntu.
https://bugs.launchpad.net/bugs/584632

Title:
  composer changes font mid email

Status in Mozilla Thunderbird Mail and News:
  Confirmed
Status in thunderbird package in Ubuntu:
  Confirmed

Bug description:
  Binary package hint: thunderbird

  As I'm typing my emails in Thunderbird, I can see what appears to be a
  font size change on screen, normally in the second line of text. The
  second line appear smaller than the first. It's barely perceptible, so
  half them time I think I am imagining it.

  Well, I've started Bccing to myself to check, and the emails I am
  receiving from myself are not only a different size, they're also a
  different font. Composer starts in some default serif, and by the
  second line is sans. I'd bee glad to email someone viz thunderbird,
  and also send along a screenshot of how it looks while I am typing.

  Thanks.

To manage notifications about this bug go to:
https://bugs.launchpad.net/thunderbird/+bug/584632/+subscriptions