Bug 164149 - Bold text cannot be unbolded when it uses a font weight under 600
Summary: Bold text cannot be unbolded when it uses a font weight under 600
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-10-28 13:56 PDT by Steve
Modified: 2024-04-19 12:37 PDT (History)
5 users (show)

See Also:


Attachments
Repro.html (1.90 KB, text/html)
2016-10-28 13:56 PDT, Steve
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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?