Repository navigation
Vaadin Flow Components V24.10.2
Vaadin Flow Components 24.10.2
This is a release of the Java integration for Vaadin Components to be used from the Java server side with Vaadin Flow.
Changes in Flow Components from 24.10.1
Changes in vaadin-map-flow
Changes in vaadin-spreadsheet-flow
- Fixes:
-
⧉ Prevent infinite focus loop and stale selection in custom editors (CP: 24.10). PR:9125
This PR cherry-picks changes from the original PR #9113 to branch 24.10. --- > ## Summary > - Fix infinite
cellSelectedfeedback loop triggered by programmatic focus changes (e.g.inputElement.select()) inonCustomEditorDisplayedcallbacks > - Prevent delayed server responses from hijacking the cell selection when the user has already navigated away, including via keyboard navigation through cells with custom editors > - Add server-side reentrancy guard to prevent recursiveonCustomEditorDisplayedcalls when callback code callsrefreshCells()> > ## Root cause >CustomEditorEventListener.ONFOCUSunconditionally sentcellSelectedto the server and updated the client-side selection on every focus event — including programmatic focus frominputElement.select()called inonCustomEditorDisplayed. When the callback had non-trivial processing time, the delayed response would steal focus and selection from whatever cell the user had since navigated to, and could trigger an infinite client→server→client loop. > > ## Approach > Client-side (CustomEditorEventListener): trackmousedown/touchstartevents to distinguish user-initiated focus from programmatic focus. Only update the selection and sendcellSelectedfor user-initiated focus. For programmatic focus on a cell the user has already left, return focus to the sheet. Keyboard navigation is unaffected becauseSelectionHandleralready handles selection updates andcellSelectedindependently. > > Server-side (Spreadsheet): reentrancy guard (insideCustomEditorCallback) onloadCustomEditorOnSelectedCell()to prevent recursiveonCustomEditorDisplayedcalls when user code in the callback callsrefreshCells(). > > Fixes #9036 > > ## Test plan > - [ ]CustomEditorIT#comboBoxEditorWithSelect_clickCell_callbackFiredOnce— verifies single click triggers exactly 1 callback (no loop) > - [ ]CustomEditorIT#comboBoxEditorWithSelect_switchBetweenCells_noInfiniteLoop— rapidly clicks through editor cells to a non-editor cell, verifies selection stays on the final cell and callback count is bounded > - [ ] All 26 existingCustomEditorITtests pass (keyboard navigation, Tab, Shift+Tab, F2, Enter, ESC, shared editors, frozen panes, always-visible mode) > > 🤖 Generated with Claude Code
-