fix: markdown field tooltip being hidden in horizontal form layout (#9420)

This commit is contained in:
Katherine
2026-05-10 19:39:28 +08:00
committed by GitHub
parent 49a299e9be
commit 6ba91da462
2 changed files with 58 additions and 3 deletions
@@ -14,12 +14,40 @@ export default genStyleHook('nb-markdown-vditor', (token) => {
return {
[componentCls]: {
position: 'relative',
overflow: 'visible',
'&:hover, &:focus-within': {
zIndex: 1000,
},
'.vditor-reset': { fontSize: `${token.fontSize}px !important`, color: 'unset' },
'.vditor': {
borderRadius: 8,
overflow: 'visible',
},
'.vditor .vditor-content': { borderRadius: '0 0 8px 8px', overflow: 'hidden' },
'.vditor .vditor-toolbar': { paddingLeft: ' 16px !important', borderRadius: '8px 8px 0 0' },
'.vditor .vditor-toolbar': {
position: 'relative',
overflow: 'visible',
paddingLeft: ' 16px !important',
borderRadius: '8px 8px 0 0',
},
'.vditor .vditor-tooltipped:hover, .vditor .vditor-tooltipped:focus, .vditor .vditor-tooltipped:active': {
zIndex: 1000,
},
'.vditor .vditor-toolbar .vditor-tooltipped__n::after, .vditor .vditor-toolbar .vditor-tooltipped__ne::after, .vditor .vditor-toolbar .vditor-tooltipped__nw::after':
{
top: '100%',
bottom: 'auto',
marginTop: 5,
marginBottom: 0,
},
'.vditor .vditor-toolbar .vditor-tooltipped__n::before, .vditor .vditor-toolbar .vditor-tooltipped__ne::before, .vditor .vditor-toolbar .vditor-tooltipped__nw::before':
{
top: 'auto',
bottom: -5,
borderTopColor: 'transparent',
borderBottomColor: '#3b3e43',
},
'.vditor .vditor-content .vditor-ir .vditor-reset': { padding: '10px !important' },
'.vditor-ir pre.vditor-reset': {
backgroundColor: `${token.colorBgContainer}!important`,
@@ -14,10 +14,37 @@ export default genStyleHook('nb-field-markdown-vditor', (token) => {
return {
[componentCls]: {
position: 'relative',
overflow: 'visible',
'&:hover, &:focus-within': {
zIndex: 1000,
},
'.vditor-reset': { fontSize: `${token.fontSize}px !important`, color: 'unset', padding: `10px !important` },
'.vditor': { borderRadius: 8 },
'.vditor': { borderRadius: 8, overflow: 'visible' },
'.vditor .vditor-content': { borderRadius: '0 0 8px 8px', overflow: 'hidden' },
'.vditor .vditor-toolbar': { paddingLeft: ' 16px !important', borderRadius: '8px 8px 0 0' },
'.vditor .vditor-toolbar': {
position: 'relative',
overflow: 'visible',
paddingLeft: ' 16px !important',
borderRadius: '8px 8px 0 0',
},
'.vditor .vditor-tooltipped:hover, .vditor .vditor-tooltipped:focus, .vditor .vditor-tooltipped:active': {
zIndex: 1000,
},
'.vditor .vditor-toolbar .vditor-tooltipped__n::after, .vditor .vditor-toolbar .vditor-tooltipped__ne::after, .vditor .vditor-toolbar .vditor-tooltipped__nw::after':
{
top: '100%',
bottom: 'auto',
marginTop: 5,
marginBottom: 0,
},
'.vditor .vditor-toolbar .vditor-tooltipped__n::before, .vditor .vditor-toolbar .vditor-tooltipped__ne::before, .vditor .vditor-toolbar .vditor-tooltipped__nw::before':
{
top: 'auto',
bottom: -5,
borderTopColor: 'transparent',
borderBottomColor: '#3b3e43',
},
'.vditor .vditor-content .vditor-ir .vditor-reset': { paddingLeft: ' 16px !important' },
'.vditor-ir pre.vditor-reset': {
backgroundColor: `${token.colorBgContainer}!important`,