Skip to content

Yahoo/Hotmail: Clicking formatting button breaks Markdown Toggle #16

@adam-p

Description

@adam-p

Reproduction:

  1. In Chrome (haven't confirmed Firefox) open the Yahoo mail editor.
  2. Type some text.
  3. Click the B (bold) button.
  4. Click back into the compose area.
  5. Right-click and click "Markdown Toggle".

Markdown Here's "The selected field is not valid for Markdown rendering. Please use a rich editor." will result.

The problem is that findFocusedElem() is finding the bold button instead of the compose box.

Not sure yet how to fix it. activeElement isn't an array, it's a single value, so it's not like there's a concept of more than one active element... even though the compose box clearly has focus. Maybe activeElement isn't the correct thing to use for finding the focused element?

Does each iframe have its own activeElement (that can all be meaningful at the same time)? Maybe all iframes should be traversed until a valid Markdown Here target is found?

Workaround: Click on the font size combo box and then back into the compose box. (Which makes no sense, but it works.)

This bug is especially bad since the "maintain pre-formatted text" feature was added, which encourages (or at least doesn't dissuade users) to click the formatting buttons.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions