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
Owner:
Closed: May 2016
Cc:
Components:
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 mizt...@gmail.com, 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:
1. http://jsbin.com/vomuvefuva/1/edit?html,console,output

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 mizt...@gmail.com, 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.
screenshot.png
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 mizt...@gmail.com, 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.
Cc: rnimmagadda@chromium.org
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 pdr@chromium.org, Feb 13 2016

Labels: -Cr-Blink Cr-Blink-Editing OS-Android
Owner: yosin@chromium.org
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 yosin@chromium.org, Feb 16 2016

Owner: ----
Status: Available

Comment 9 by mizt...@gmail.com, Feb 24 2016

rnimmagadda@chromium.org: I don't see any attached screen recordings.
I'm trying to fix this problem: https://codereview.chromium.org/1960553002/
Project Member

Comment 11 by bugdroid1@chromium.org, May 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1e7d66ca32345881ae135af6ed712d3571f9b9e9

commit 1e7d66ca32345881ae135af6ed712d3571f9b9e9
Author: joone.hur <joone.hur@intel.com>
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 
TEST=editing/execCommand/queryCommandState-03.html

Review-Url: https://codereview.chromium.org/1960553002
Cr-Commit-Position: refs/heads/master@{#392855}

[add] https://crrev.com/1e7d66ca32345881ae135af6ed712d3571f9b9e9/third_party/WebKit/LayoutTests/editing/execCommand/queryCommandState-03.html
[modify] https://crrev.com/1e7d66ca32345881ae135af6ed712d3571f9b9e9/third_party/WebKit/Source/core/editing/EditingStyle.cpp

Comment 12 by a...@chromium.org, May 17 2016

Cc: a...@chromium.org
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.




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

Comment 14 by a...@chromium.org, May 17 2016

Status: Fixed (was: Available)
Marking this Fixed as per C#12.
Owner: joone....@intel.com

Sign in to add a comment