mirror of
https://github.com/RGBCube/serenity
synced 2025-06-29 03:52:12 +00:00
LibWeb: Fix regression of "contenteditable" attribute
This commit is contained in:
parent
95331ea864
commit
08359ba578
3 changed files with 5 additions and 5 deletions
|
@ -34,12 +34,12 @@ HTMLElement::ContentEditableState HTMLElement::content_editable_state() const
|
|||
{
|
||||
auto contenteditable = attribute(HTML::AttributeNames::contenteditable);
|
||||
// "true", an empty string or a missing value map to the "true" state.
|
||||
if (contenteditable.is_empty() || contenteditable.equals_ignoring_case("true"))
|
||||
if ((!contenteditable.is_null() && contenteditable.is_empty()) || contenteditable.equals_ignoring_case("true"))
|
||||
return ContentEditableState::True;
|
||||
// "false" maps to the "false" state.
|
||||
if (contenteditable.equals_ignoring_case("false"))
|
||||
return ContentEditableState::False;
|
||||
// An invalid value maps to the "inherit" state.
|
||||
// Having no such attribute or an invalid value maps to the "inherit" state.
|
||||
return ContentEditableState::Inherit;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue