Repository navigation
fix: listen to opened-changed events in custom editors - #9671
Conversation
This change overrides the `focus` method to change how focus is handled when the element is in fullscreen mode and it's focused. This is needed to avoid the element being immediatelly removed by the Grid Pro when the user is in a device with small viewport. The element receives focus, but the `_onFocus` listener has a similar detection which removes the focus from the input element, which causes the component to be removed from the cell when used as a custom editor. Part of #9158
This change adds a `opened-changed` listener for custom editors and checks that either the target element or its `inputElement` is focused. If not, then calls the routine to stop the edit in the cell. This is done for the case a `vaadin-date-pikcer` is used as a editor and the user is interacting with the cell containing it in a device with a small viewport like a phone. In this case, when the picker overlay is closed, the focus is not restored to the input, which should be a right time to remove the editor. Part of #9158
948b741 to
4f8fa1e
Compare
4f8fa1e to
1b19afd
Compare
|
|
Hi @DiegoCardoso and @web-padawan, when i performed cherry-pick to this commit to 24.7, i have encountered the following issue. Can you take a look and pick it manually? |
|
This ticket/PR has been released with Vaadin 25.0.0-alpha3. |



Description
This change adds an
opened-changedlistener for custom editors and checks that either the target element or itsinputElementis focused. If not, then it calls the routine to stop the edit in the cell.This is done for the case that a
vaadin-date-pickeris used as an editor and the user is interacting with the cell containing it in a device with a small viewport, like a phone. In this case, when the picker overlay is closed, the focus is not restored to the input, which should be the right time to remove the editor.Part of #9158
Depends on #9670
Type of change
Bugfix