fix(bento): global z-index reset onDragStart()
This commit is contained in:
@@ -22,10 +22,10 @@ module.exports = {
|
|||||||
tsconfigRootDir: __dirname,
|
tsconfigRootDir: __dirname,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
'prettier/prettier': 'error',
|
'prettier/prettier': 'warn',
|
||||||
'react/react-in-jsx-scope': 'off',
|
'react/react-in-jsx-scope': 'off',
|
||||||
'jsx-a11y/anchor-is-valid': [
|
'jsx-a11y/anchor-is-valid': [
|
||||||
'warning',
|
'warn',
|
||||||
{
|
{
|
||||||
components: ['Link'],
|
components: ['Link'],
|
||||||
specialLink: ['hrefLeft', 'hrefRight'],
|
specialLink: ['hrefLeft', 'hrefRight'],
|
||||||
|
|||||||
@@ -37,7 +37,12 @@ const BentoBox = ({ posts }) => {
|
|||||||
if (timeoutRef.current) {
|
if (timeoutRef.current) {
|
||||||
clearTimeout(timeoutRef.current)
|
clearTimeout(timeoutRef.current)
|
||||||
}
|
}
|
||||||
element.style.zIndex = '100'
|
|
||||||
|
document.querySelectorAll('.react-grid-item').forEach((item) => {
|
||||||
|
;(item as HTMLElement).style.zIndex = '1'
|
||||||
|
})
|
||||||
|
|
||||||
|
element.style.zIndex = '10'
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleDragStop = (element) => {
|
const handleDragStop = (element) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user