Description:
In the @syncfusion/ej2-react-documenteditor component, there is an issue with applying the same font size to different text selections consecutively. When I select a word and change its font size to a specific value (e.g., 9), and then immediately select another word to apply the same font size (9), the change does not trigger. The font size only applies if I deselect the text and reselect it again.
It seems like the toolbar's font size dropdown state is not updating correctly upon the new text selection, causing the onChange event to not fire because the selected value in the dropdown is technically the same.
Steps to Reproduce:
Open a document in the Document Editor.
Select a word.
Change the font size to 9 using the toolbar. (The text size updates successfully).
Select another word (which currently has a different font size, e.g., 11).
Open the font size dropdown and click 9 again.
Notice that the font size of the second word does not change.
Deselect the text, select the same word again, and click 9. Now it works.
Expected Behavior:
The font size dropdown in the toolbar should automatically update its value to reflect the font size of the currently selected text. When a user selects a new word and chooses 9 from the dropdown, the font size should be applied immediately, regardless of what the previous selection's font size was.
Actual Behavior:
The font size does not change on the second attempt because the toolbar seems to retain the previous 9 value, failing to trigger a change event.
Environment:
Package: @syncfusion/ej2-react-documenteditor
Version: ^33.2.5
Framework: React
Description:
In the @syncfusion/ej2-react-documenteditor component, there is an issue with applying the same font size to different text selections consecutively. When I select a word and change its font size to a specific value (e.g., 9), and then immediately select another word to apply the same font size (9), the change does not trigger. The font size only applies if I deselect the text and reselect it again.
It seems like the toolbar's font size dropdown state is not updating correctly upon the new text selection, causing the onChange event to not fire because the selected value in the dropdown is technically the same.
Steps to Reproduce:
Open a document in the Document Editor.
Select a word.
Change the font size to 9 using the toolbar. (The text size updates successfully).
Select another word (which currently has a different font size, e.g., 11).
Open the font size dropdown and click 9 again.
Notice that the font size of the second word does not change.
Deselect the text, select the same word again, and click 9. Now it works.
Expected Behavior:
The font size dropdown in the toolbar should automatically update its value to reflect the font size of the currently selected text. When a user selects a new word and chooses 9 from the dropdown, the font size should be applied immediately, regardless of what the previous selection's font size was.
Actual Behavior:
The font size does not change on the second attempt because the toolbar seems to retain the previous 9 value, failing to trigger a change event.
Environment:
Package: @syncfusion/ej2-react-documenteditor
Version: ^33.2.5
Framework: React