-
Bug
-
Resolution: Fixed
-
Normal
-
8.5.0
-
ZK 8.5.0
-
None
steps to reproduce
http://zkfiddle.org/sample/33i8j5r/1-tbeditor-overlapped-other-elements
run fiddle on Iceblue[8.5.0]
click the "You can't hit me!" button
actual result
You can't hit that button.
expected result
Hit and "Impossible!!" popped up
debug info
The height of <div class="z-tbeditor"> is smaller than its content.
root cause
Tbeditor.js about line 125
- jqn.find('ul').outerHeight(); //buttons' height
In trumbowyg version 2.6.0, the buttons use <div> to enclose, not <ul>.
Workaround
Still have some problems, but half a loaf is better than none
<script><![CDATA[ zk.afterLoad('zkmax.inp', function () { zk.override(zkmax.inp.Tbeditor.prototype, {}, { _calcEditorHeight: function (height) { var jqn = jq(this.$n()); var tbBox = jqn.children().eq(0); var btnPaneSclass = this.$s('button-pane'); if (!tbBox) return null; return zk.parseInt(height) - zk.parseInt(tbBox.css('marginTop')) - zk.parseInt(tbBox.css('marginBottom')) - 2 * zk.parseInt(tbBox.css('border')) - jqn.find('.' + btnPaneSclass).outerHeight(); //buttons' height } }); }); ]]></script>
- relates to
-
ZK-3336 tbeditor version update
- Closed