Created
January 30, 2013 12:32
-
-
Save blaine/4672979 to your computer and use it in GitHub Desktop.
This is an obscure and totally weird bug to do with contenteditable rendering when a negative text-indent is applied. Basically, the insertion point only appears when the contenteditable element has content. When it's empty, the insertion point is empty.
This file contains 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
<html> | |
<head> | |
<style> | |
.container { | |
width: 50px; | |
height: 1em; | |
position: absolute; | |
left: 500px; | |
top: 200px; | |
background: yellow; | |
} | |
.editable { | |
text-indent: -250px; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="editable" contenteditable="true"></div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment