Bug 164149

Summary: Bold text cannot be unbolded when it uses a font weight under 600
Product: WebKit Reporter: Steve <steve>
Component: TextAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, fantasai.bugs, mmaxfield, vitor.roriz, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Repro.html none

Description Steve 2016-10-28 13:56:56 PDT
Created attachment 293207 [details]
Repro.html

Steps to reproduce:

1. Download attached Repro.html or go to https://jsfiddle.net/sk3bwkgx/
2. Select the bold text inside the red contenteditable region
3. Click the "Toggle Bold" button
4. Notice that the text does not become unbold

It seems like the browser is deciding that since the b/strong tags have a weight closer to normal than bold that the text is already "unbolded" even though visually and semantically that isn't the case. The browser should instead decide whether to unbold something based on the semantic tags involved in the selection.

This can be reproduced in Chrome/Safari/Firefox, but works correctly in IE11/Edge.
Comment 1 Steve 2016-10-28 14:02:16 PDT
Slight problem in the JSFiddle link above. Please use Repro.html or this updated JSFiddle instead: https://jsfiddle.net/sk3bwkgx/1/
Comment 2 Radar WebKit Bug Importer 2016-10-30 23:22:34 PDT
<rdar://problem/29022146>
Comment 3 Ahmad Saleem 2024-04-19 12:37:58 PDT
Internet Explorer & Microsoft Edge (EdgeHTML) is gone and while all other browsers (Safari 17.5 Beta, Chrome Canary 125 and Firefox Nightly 127) match each other and don't do anything for this bold text so we don't have any compat risk, so I don't think we should anything here and we can mark this as 'RESOLVED WORKSFORME' or 'RESOLVED INVALID'?

@Vitor & @Elika - any thoughts?