-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] pivot: mouse events do not work in pivot text input
We added a behaviour to select the whole text of the measure name input when the input is focused. We select the whole input text on `focus` event, but we had to stop/prevent the `mouseup` events, otherwise the event would sometime unselect the text. It turns out (surprise) that entirely disabling `mouseup` event on the input was a bad idea: it prevented the user from moving the cursor inside the input when all the text was selected. This commit changes the way we handle all this: - if the input is not focused, we disable the `mousedown` event on it. This prevent the `focus` event from firing. - if the input is not focused and we catch a `mouseup` event on the input, we select the whole text and focus the input manually. - if the input is focused, we do not touch the events and let the browser handle them. closes #5415 Task: 4350439 X-original-commit: 85aaab6 Signed-off-by: Lucas Lefèvre (lul) <[email protected]>
- Loading branch information
1 parent
5f27a7e
commit a7552fd
Showing
3 changed files
with
25 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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