-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Normal
-
Affects Version/s: 8.6.0.1
-
Component/s: None
-
Security Level: Jimmy
-
None
-
None
Steps to Reproduce
http://zkfiddle.org/sample/qdkvrc/1-inconsistent-drag-message-with-master-detail
run fiddle
drag 1st row
open detail component (arrow on the left) and drag 1st row again
Current Result
when the detail is closed, the detail text appear first in the drag message
when the detail is open, the detail text appear last in the drag message
Expected Result
The row message should stay consistent regardless of details open status
Debug Info
Root Cause
the detail component position in the row child element list is firstChild when closed and lastChild when opened.
Since the getDragMessage() fonction uses htmlNode.innerText to generate the message, it will display the content of the detail if the detail is 1st (closed) and will not if the detail is last (opened)
Workaround
<script><![CDATA[ zk.afterLoad('zul.grid', function() { var xRow = {}; zk.override(zul.grid.Row.prototype, xRow ,{ getDragMessage_: function () { if (jq.nodeName(this.getDragNode(), 'tr', 'td', 'th')) { var n = this.$n('real') || this.getCaveNode(), msg = n ? n.innerText || n.textContent || '' : ''; return msg ? zUtl.encodeXML(msg) : msg; } } });//zk.override });//zk.afterLoad ]]></script>