mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-22 10:11:54 +00:00
LibWeb: Fix always-enabled copy command in queryCommandEnabled()
The "copy" command is not in the Miscellaneous commands section. The "defaultParagraphSeparator" command is, however. Let the accompanying comment reflect that.
This commit is contained in:
parent
3f1523b16c
commit
c9a6bac57f
Notes:
github-actions[bot]
2024-12-02 23:21:02 +00:00
Author: https://github.com/gmta
Commit: c9a6bac57f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2697
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/tcl3
1 changed files with 3 additions and 5 deletions
|
@ -96,12 +96,10 @@ bool Document::query_command_enabled(FlyString const& command)
|
|||
return false;
|
||||
|
||||
// https://w3c.github.io/editing/docs/execCommand/#enabled
|
||||
// Among commands defined in this specification, those listed in Miscellaneous commands are
|
||||
// always enabled, except for the cut command and the paste command.
|
||||
// AD-HOC: Cut and Paste are not in the Miscellaneous commands section; so Copy is assumed
|
||||
// AD-HOC: DefaultParagraphSeparator is also in the Miscellaneous commands section
|
||||
// Among commands defined in this specification, those listed in Miscellaneous commands are always enabled, except
|
||||
// for the cut command and the paste command.
|
||||
// NOTE: cut and paste are actually in the Clipboard commands section
|
||||
if (command.is_one_of(
|
||||
Editing::CommandNames::copy,
|
||||
Editing::CommandNames::defaultParagraphSeparator,
|
||||
Editing::CommandNames::redo,
|
||||
Editing::CommandNames::selectAll,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue