[Webkit-unassigned] [Bug 158115] New: execCommand('underline') does not 'toggle' value returned by subsequent call to queryCommandState('underline') when content is underlined and no selection is made.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 26 04:27:26 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=158115

            Bug ID: 158115
           Summary: execCommand('underline') does not 'toggle' value
                    returned by subsequent call to
                    queryCommandState('underline') when content is
                    underlined and no selection is made.
    Classification: Unclassified
           Product: WebKit
           Version: Safari 9
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Bindings
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jhargreaves4 at bloomberg.net
                CC: cdumez at apple.com

Created attachment 279878
  --> https://bugs.webkit.org/attachment.cgi?id=279878&action=review
bug_demo

When using the attribute 'contenteditable=true' on an element, if said element in underlined and no selection is made,
a call to execCommand('underline') will not result in the value returned by 'queryCommandState('underline')' to be 'toggled' from true to false and vice versa;
this behavior is inconsistent with the behavior of 'execCommand('bold')', 'execCommand('italic')' for example, where the relevant command states 
are in fact toggled.

The attached demo will behave differently in chrome when compared to safari. (clicking toggle underline does toggled the state in chrome). 

I believe this bug to be the inverse of this bug: https://bugs.webkit.org/show_bug.cgi?id=17594

As far as I'm aware this is a bug, but please forgive me if it's desired behavior?

Bug is at least present on IOS 9.2 and Safari 9 on Mac. I have not had time to test other platforms.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160526/2d0a508d/attachment.html>


More information about the webkit-unassigned mailing list