execCommand('forecolor') with RGB values is resulting in unexpected colors

Confirmed Issue #12855917 • Assigned to Kris K.

Details

Author
Wei K.
Created
Jul 20, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

document.execCommand('forecolor', false' …) is not producing the right colors when an "rgb(…)" value is being passed in.

For example,
document.execCommand('forecolor',false, '#ff0000') is resulting in #ff0000 applied.
document.execCommand('forecolor',false, 'rgb(0,0,0)') is resulting in #b00000 applied.
document.execCommand('backcolor',false, 'rgb(255,0,0)') works as expected, #ff0000 applied to background.

See attached document for repro.

UPDATED REPRO STEPS (by MS Edge Team)
Highlight part of the sample text, then click the first button and unselect the text; it should have changed. Repeat for next button and last button.

Attachments

1 attachment

Comments and activity

  • Hello,

    Thank you for providing this information about the issue. Unfortunately, we are unable to reproduce this problem in Edge with the information at hand. Please attach the repro document.

    Best Wishes,
    The MS Edge Team

  • Microsoft Edge Team

    Changed Assigned To to “James M.”

  • James, see the attached file.

  • Hello,

    Thank you for providing this information about the issue. We are unable to reproduce the problem and find your sample exhibits no behavior in any browsers. You may need to enable DesignMode via script and additionally check your repro for typos (RedRGB is not 0,0,0). Please update this case with a new sample and include the version of Edge.

    Best Wishes,
    The MS Edge Team

  • Apologies for the mistake. Please see index3.html which has DesignMode enabled via script, and rgb(255,0,0). The repro is still consistent, and I verified that the same html works with chrome. I am getting back the hexadecimal value #002500 applied instead of #ff0000.

    I confirmed the repro on the following versions of edge:
    Microsoft Edge 41.16241.1001.0
    Microsoft Edge 40.15063.0.0

  • Microsoft Edge Team

    Changed Steps to Reproduce

    Changed Assigned To to “Travis L.”

    Changed Status to “Confirmed”

    Changed Assigned To from “Travis L.” to “Kris K.”

You need to sign in to your Microsoft account to add a comment.

Sign in