Skip to content
代码片段 群组 项目
未验证 提交 2d29ad27 编辑于 作者: Mark Florian's avatar Mark Florian
浏览文件

Fix math block alert rendering

This replaces the static markup to recreate an alert with a real
`GlAlert` instance for maths blocks. This fixes incorrect styling of the
alert, incorrect positioning of the `<copy-code>` element, and also
simplifies wiring up of events.

Before, the `<copy-code>` button was displaying over the alert's dismiss
button. Now, it correctly displays within the maths code block it's
associated with.

Since `<copy-code>` is absolutely positioned, and its nearest positioned
ancestor is the `.js-markdown-code` element, and the alert was the first
child of that element, the `<copy-code>` button was rendered over the
alert instead of the code block below.

Now, the alert is the immediate previous sibling of the
`.js-markdown-code` element, instead of its first child.

Addresses https://gitlab.com/gitlab-org/gitlab/-/issues/455642 and
https://gitlab.com/gitlab-org/gitlab/-/issues/455665.

Changelog: fixed
上级 96b9c5b4
No related branches found
No related tags found
加载中
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册