fix(bento): global z-index reset onDragStart()

This commit is contained in:
Jason
2023-09-20 00:25:52 -07:00
parent deec45c7f3
commit e5cd80fb10
2 changed files with 8 additions and 3 deletions

View File

@@ -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'],

View File

@@ -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) => {