My dilemma involves a div that functions as an "input" using the contenteditable
attribute. It works perfectly when enabled, but I face an issue when I need to disable this "input" by setting contenteditable='false'
. This change causes the div to lose its height, which you can see in this JSFiddle.
<div contenteditable="true" class="visible-borders"></div>
<div contenteditable="false" class="visible-borders"></div>
I am seeking a solution to this problem. Ideally, I would like a fix that does not involve using min-height
. Unfortunately, switching away from contenteditable
is not an option as I am working within someone else's codebase.