I'm trying to develop a web extension for Safari on both Mac OS and iPad.
There is one div that I want to hide by default, when user clicks a button, the div shows with proper content. If the button is clicked again, the div goes hide again, and so on.
I've got it to work on Mac OS by toggling the div's display property between "block" and "none". This works perfectly on Mac OS but on iPad, when going from "block" to "none", the content is hidden but the space is kept. Is this a bug on iPad Safari or am I doing something wrong? Check the screenshots below.
Safari extension is supported on iPad since iOS 15, I've tested this on iOS 15.0 and 15.2, same result.
Expected behavior: image3 should look exactly like image1, without the shadow area on lower bottom.
- Extension's popup window by default:
- When user click, show the div:
- User click again, hide the div:
Any help is appreciated.