CellEditor: complete cell edit if another popup opens#1657
Closed
cguglielmo wants to merge 4 commits intoreleases/25.2from
Closed
CellEditor: complete cell edit if another popup opens#1657cguglielmo wants to merge 4 commits intoreleases/25.2from
cguglielmo wants to merge 4 commits intoreleases/25.2from
Conversation
ad69e61 to
1b4c05b
Compare
Currently, if a column has a max length and htmlEnabled set to true, the html content may be truncated incorrectly resulting in UI errors. This happens because the Scout JS table just concatenates the table rows together and if the cells contain html tags especially <div> that are not closed, the rows won't be built correctly. Now, only the text inside the html content will be truncated preserving the html tags. Also: add ellipsis if text is truncated in a string column. 426350
Popup._onPopupOpen calls close() but that should not be called for cell editors because it just closes the editor without correctly cancelling or completing the edit. Instead of extracting the close() call of _onPopupOpen in a method with a name to be defined, close() now just delegates to completeCellEdit(). Also, if cell editing has been started and startCellEdit() is called again, the existing edit needs to be ended first, otherwise an error may occur because the new cell editor popup closes the existing editor first which calls field.acceptInput(), but popup.cell.field is already the new field which is not rendered yet. 417214
1b4c05b to
9749893
Compare
The cell editor waits for the field's acceptInput promise to be resolved when completing the cell edit before the value can be written to the cell and the editor closed. Unfortunately, if acceptInput of the SmartField is called a second time, a new deferred instance will be created without resolving the previous one. This has the effect that the cell editor never closes. This can happen if a cell editor is open, the user types invalid text and another popup opens at the same time -> 1. the cell editor closes, calls completeCellEdit and waits for acceptInput 2. the new popup takes the focus which blurs the smart field and calls acceptInput again -> a new deferred is created. 417214
9749893 to
74f8014
Compare
Member
Author
|
Merged with a separate PR for 26.1 only. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Popup._onPopupOpen calls close() but that should not be called for cell editors because it just closes the editor without correctly cancelling or completing the edit.
Instead of extracting the close() call of _onPopupOpen in a method with a name to be defined, close() now just delegates to completeCellEdit().
417214