Skip to content

Commit

Permalink
Merge pull request #2704 from serlo/2700-double-click-into-the-latex-…
Browse files Browse the repository at this point in the history
…editor-closes-the-modal

editor(math): stop latex overlay from closing on double/triple click
  • Loading branch information
elbotho authored Aug 7, 2023
2 parents 0eb7d8c + 4932dde commit bf0455f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/serlo-editor/math/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,10 @@ export function MathEditor(props: MathEditorProps) {

function renderOverlayPortal() {
const children = (
<div className="fixed bottom-0 z-50 rounded-t-xl bg-editor-primary-100 p-3 shadow-menu">
<div
className="fixed bottom-0 z-50 rounded-t-xl bg-editor-primary-100 p-3 shadow-menu"
onClick={(e) => e.stopPropagation()} // double/triple clicks close overlay otherwise (#2700)
>
<p className="mr-0.5 mt-1 text-right text-sm font-bold text-gray-600">
{hasError ? mathStrings.onlyLatex : mathStrings.latexEditorTitle}
</p>
Expand Down

0 comments on commit bf0455f

Please sign in to comment.