Skip to content

Commit

Permalink
Fix expansion of toolbar in the exam environment
Browse files Browse the repository at this point in the history
Currently, the exam environment includes an old version of
rich-text-editor, which overrides much of our style changes. As a
workaround, rename the rich-text-editor-characters-expanded class so our
changes to it won't be overridden.
  • Loading branch information
sluukkonen committed Sep 24, 2020
1 parent 14bfee5 commit 552cee9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions public/rich-text-editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
transition: top 0.15s;
}

.rich-text-editor-focus .rich-text-editor-characters-expanded {
.rich-text-editor-focus .rich-text-editor-show-all-characters {
top: 0;
}

Expand Down Expand Up @@ -255,7 +255,7 @@
display: none;
}

.rich-text-editor-characters-expanded .rich-text-editor-toolbar-characters .rich-text-editor-button,
.rich-text-editor-show-all-characters .rich-text-editor-toolbar-characters .rich-text-editor-button,
.rich-text-editor-toolbar-characters .rich-text-editor-button.rich-text-editor-characters-popular {
display: inline-block;
}
Expand All @@ -276,7 +276,7 @@
background: url('expand.svg') 50% 50% no-repeat;
}

.rich-text-editor-characters-expanded .rich-text-editor-characters-expand-collapse {
.rich-text-editor-show-all-characters .rich-text-editor-characters-expand-collapse {
background-image: url('collapse.svg');
}

Expand Down
2 changes: 1 addition & 1 deletion src/toolbars.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function init(mathEditor, hasRichTextFocus, l, baseUrl) {
})
.on('mousedown', '[data-js="expandCollapseCharacters"]', (e) => {
e.preventDefault()
$toolbar.toggleClass('rich-text-editor-characters-expanded')
$toolbar.toggleClass('rich-text-editor-show-all-characters')
})
.on('mousedown', '[data-js="richTextEditorHelp"]', (e) => {
e.preventDefault()
Expand Down

0 comments on commit 552cee9

Please sign in to comment.