Skip to content

Commit 53eecba

Browse files
authored
Merge pull request #3832 from AlchemyCMS/fix/headline-editor-anchor-position
fix(HeadlineEditor): Fix anchor position
2 parents d187dd2 + 84aebbb commit 53eecba

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/components/alchemy/ingredients/headline_editor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def input_field
6161

6262
def css_classes
6363
super + [
64-
has_level_select? ? "with-level-select" : nil,
64+
level_options.any? ? "with-level-select" : nil,
6565
has_size_select? ? "with-size-select" : nil
6666
].compact
6767
end

spec/components/alchemy/ingredients/headline_editor_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
is_expected.to have_selector("sl-tooltip[content='Level']")
4242
end
4343

44-
context "and having many level options" do
44+
context "and having any level options" do
4545
before do
4646
allow(headline_editor).to receive(:level_options) do
47-
[["H1", 1], ["H2", 2]]
47+
[["H1", 1]]
4848
end
4949
end
5050

0 commit comments

Comments
 (0)