fix(bento): global z-index reset onDragStart()
This commit is contained in:
@@ -22,10 +22,10 @@ module.exports = {
|
||||
tsconfigRootDir: __dirname,
|
||||
},
|
||||
rules: {
|
||||
'prettier/prettier': 'error',
|
||||
'prettier/prettier': 'warn',
|
||||
'react/react-in-jsx-scope': 'off',
|
||||
'jsx-a11y/anchor-is-valid': [
|
||||
'warning',
|
||||
'warn',
|
||||
{
|
||||
components: ['Link'],
|
||||
specialLink: ['hrefLeft', 'hrefRight'],
|
||||
|
||||
@@ -37,7 +37,12 @@ const BentoBox = ({ posts }) => {
|
||||
if (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) => {
|
||||
|
||||
Reference in New Issue
Block a user