New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 4 users

Issue metadata

Status: Fixed
Closed: May 2016
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows
Pri: 2
Type: Bug

Sign in to add a comment

document.queryCommandState returns true for bold, italic, underline, and strikethrough after selecting image

Reported by, Feb 7 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36

Steps to reproduce the problem:

What is the expected behavior?
document.queryCommandState should return false

What went wrong?
document.queryCommandState returned true

Did this work before? N/A 

Chrome version: 48.0.2564.97  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 20.0 r0
Status: WontFix
Unable to repro on 	48.0.2564.97. Am I holding this wrong?

Comment 2 by, Feb 11 2016

Are you looking at the console output on the JS Bin?  Here's a screenshot.  It shows my Chrome version, the JS Bin with the selected image, and the document.queryCommandState returning true for bold, italic, underline, and strikeThrough.
207 KB View Download
Still unable to reproduce here. I see four "false". Have you tried disabling all extensions? I wonder if one of them is mucking with queryCommandState.
Labels: -OS-Windows -Arch-x86_64 Needs-TestConfirmation
Status: Unconfirmed

Comment 5 by, Feb 12 2016

Are you running your tests on a Mac?  I can confirm this function correctly returns false on OX X 10.10 running Chrome 48.

However, I have tested Chrome 48 on Windows 10, 8.1, and 7.  On each of these configurations, it *incorrectly* returns true.
Labels: -Needs-TestConfirmation OS-Windows OS-Linux M-49
Status: Untriaged
Able to repro this issue on Windows 7, 10 & Ubuntu Trusty (14.04) for Google Chrome Stable Version - 48.0.2564.109	

This is a Non-Regression issue existing from M30 - # - 30.0.1549.0

Screen-recordings are attached.

Note: Issue not observed on MAC OS.

Thank you.

Comment 7 by, Feb 13 2016

Labels: -Cr-Blink Cr-Blink-Editing OS-Android
This is a curious bug. I can reproduce it on Android too, but not OSX.

I think this would be considered an editing bug? @Yosin, would you be able to triage this?

Comment 8 by, Feb 16 2016

Owner: ----
Status: Available

Comment 9 by, Feb 24 2016 I don't see any attached screen recordings.
I'm trying to fix this problem:
Project Member

Comment 11 by, May 11 2016

The following revision refers to this bug:

commit 1e7d66ca32345881ae135af6ed712d3571f9b9e9
Author: joone.hur <>
Date: Wed May 11 04:54:09 2016

Do not ignore the text style properties when checking styles in EditingStyle.

When we run document.queryCommandState() to see if the text styles(bold,
italic, underline, strikethrough) were applied on selected img tag, it
returns wrong value because the text styles are only considerded for text node.

BUG= 584939 

Cr-Commit-Position: refs/heads/master@{#392855}


Comment 12 by, May 17 2016

Labels: TE-Verified-M52 TE-Verified-52.0.2739.0
This is working as intended on the latest M-52(52.0.2739.0) on Windows-7 and Linux Ubuntu 14.04. Attached is the screen-shot of the same.

joone.hur@: Please mark this Fixed, if there is no further work to be done.

175 KB View Download
I don't have permission to change the bug status.
yosin@ could you close this bug?

Comment 14 by, May 17 2016

Status: Fixed (was: Available)
Marking this Fixed as per C#12.

Sign in to add a comment