-
Bug
-
Resolution: Fixed
-
Normal
-
5.7.0, 5.9.0, 5.8.1
-
None
-
Security Level: Jimmy
-
None
ISSUE Update: different behavior on KK 5.8+
Reproduced on Windows 10, Chrome Version 96.0.4664.93 (Official Build) (64-bit)
Steps to Reproduce
run keikai with attached spreadsheet as source
Select Cell A1
Cell A1 has a validation list with values "Y" and "N"
Type a valid value for this cell: "Y"
Click a different cell, then focus back A1
Type in an invalid value for this cell: "abc", then click on a different cell (A6)
Validation popup is displayed, choose "retry"
Current Result
The invalid string is now set as value of the cell clicked during focus-out.
If enter is pressed, or if focus is moved from the cell, the value will be commited
Expected Result
invalid string is not set into the focused cell, focus is restored to the cell holding the validation
ORIGINAL DETAILS BELOW (KK 5.7.0)
Steps to Reproduce
run keikai with attached spreadsheet as source
Select Cell A1
Cell A1 has a validation list with values "Y" and "N"
Type a valid value for this cell: "Y"
Focus a different cell, then focus back A1
Type in an invalid value for this cell: "abc"
Validation popup is displayed, choose "retry"
Type the same value already set for this cell: "Y"
Current Result
The cell value is set in the formula bar, but the cell appear empty
Expected Result
dom value is displayed
Debug Information
caused by _updateBlockCellDomText checking for text equality between the cell edit value and the text.
In the case of validation, cell value didn't change, but cell DOM value was overwritten by validation process.
Workaround
<script><![CDATA[ zk.afterLoad("zss", function () { var _xSSheetCtrl = {}; zk.override(zss.SSheetCtrl.prototype, _xSSheetCtrl, { _updateBlockCellDomText: function(block, row, col, txt) { if (block) { var rng = block.range , l = rng.left , t = rng.top , r = rng.right , b = rng.bottom; if (l <= col && col <= r && t <= row && row <= b) { var cell = block.getCell(row, col); if (cell && (cell.edit != txt || cell.getTextNode().innerHTML != txt)) cell.getTextNode().innerHTML = txt; return true } } return false } }); }); ]]></script>
- is blocked by
-
KEIKAI-372 When focusing a cell, scroll the cell at the first row
- Closed