mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
fix: WaterMark blink when scale of window (#47895)
* fix: WaterMark blink when scale of window * chore: fix mutation --------- Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
parent
3278ce7d3a
commit
de8657bf3b
@ -50,8 +50,12 @@ export default function useWatermark(
|
||||
// Prevents using the browser `Hide Element` to hide watermarks
|
||||
watermarkEle.removeAttribute('class');
|
||||
|
||||
container.append(watermarkEle);
|
||||
if (watermarkEle.parentElement !== container) {
|
||||
container.append(watermarkEle);
|
||||
}
|
||||
}
|
||||
|
||||
return watermarkMap.get(container);
|
||||
};
|
||||
|
||||
const removeWatermark = (container: HTMLElement) => {
|
||||
|
Loading…
Reference in New Issue
Block a user