Created
March 24, 2011 22:41
-
-
Save s4y/886046 to your computer and use it in GitHub Desktop.
Make Safari think that an input does not contain priceless intelligence, the safety of which must be confirmed by the user before the window or tab can be closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function massageInput(input){ | |
var oldDisplay = input.style.display; | |
input.style.display = 'none'; | |
input.clientLeft; // trigger layout | |
input.style.display = oldDisplay; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I’d love for a less-hacky way to do this.