diff --git a/components/_util/wave/WaveEffect.tsx b/components/_util/wave/WaveEffect.tsx index 9bdbb938d6..972a6527df 100644 --- a/components/_util/wave/WaveEffect.tsx +++ b/components/_util/wave/WaveEffect.tsx @@ -46,9 +46,12 @@ const WaveEffect: React.FC = (props) => { // Get wave color from target setWaveColor(getTargetWaveColor(target)); + const isStatic = nodeStyle.position === 'static'; + // Rect - setLeft(target.offsetLeft); - setTop(target.offsetTop); + const { borderLeftWidth, borderTopWidth } = nodeStyle; + setLeft(isStatic ? target.offsetLeft : -parseFloat(borderLeftWidth)); + setTop(isStatic ? target.offsetTop : -parseFloat(borderTopWidth)); setWidth(target.offsetWidth); setHeight(target.offsetHeight); @@ -128,7 +131,7 @@ export default function showWaveEffect(node: HTMLElement, className: string) { holder.style.position = 'absolute'; holder.style.left = `0px`; holder.style.top = `0px`; - node.parentElement?.appendChild(holder); + node?.insertBefore(holder, node?.firstChild); render(, holder); } diff --git a/scripts/post-script.js b/scripts/post-script.js index 4d53f92c4c..767f5cbdbc 100644 --- a/scripts/post-script.js +++ b/scripts/post-script.js @@ -28,6 +28,7 @@ const DEPRECIATED_VERSION = { '5.1.0': ['https://github.com/react-component/drawer/pull/370'], '5.1.2': ['https://github.com/ant-design/ant-design/issues/39949'], '5.1.3': ['https://github.com/ant-design/ant-design/issues/40113'], + '5.1.4': ['https://github.com/ant-design/ant-design/issues/40186'], }; function matchDeprecated(version) {