Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Changing the font size when inputting does not take effect #6000

Open
zhuba-Ahhh opened this issue May 1, 2024 · 12 comments
Open

Bug: Changing the font size when inputting does not take effect #6000

zhuba-Ahhh opened this issue May 1, 2024 · 12 comments
Labels
contribution-week Issues that are good to be picked up for the contribution week good first issue Good for newcomers

Comments

@zhuba-Ahhh
Copy link

zhuba-Ahhh commented May 1, 2024

Lexical version: latest

Steps To Reproduce

  1. open https://playground.lexical.dev/
  2. Change font size when inputting
2024-05-01.15.48.14.mov

Link to code example:

The current behavior

Changing the font size when inputting does not take effect

The expected behavior

Input can change font size

@StyleT StyleT added good first issue Good for newcomers contribution-week Issues that are good to be picked up for the contribution week labels May 1, 2024
@CARPEDIEM05
Copy link

Hi @StyleT , I want to try this. This is the first time I am contributing to open-source. How can I assign this to myself?

@CARPEDIEM05
Copy link

CARPEDIEM05 commented May 2, 2024

Hi @zhuba-Ahhh @StyleT, I somewhat got the solution. It is taking effect but we have to press enter as it is been stated in onKeyDown that you have to press enter to change the state of the font size.

@zhuba-Ahhh
Copy link
Author

Hi @zhuba-Ahhh @StyleT, I somewhat got the solution. It is taking effect but we have to press enter as it is been stated in onKeyDown that you have to press enter to change the state of the font size.

Yes, I have found that pressing Enter is effective, but simply typing to change the value in the input box is not effective. You can try

@CARPEDIEM05
Copy link

CARPEDIEM05 commented May 2, 2024

Hi @zhuba-Ahhh
As like we are handling the onChange and onKeyDown event, we have to handle, onBlur event. My suggestion is to remove onKeyDown handler and just use the onBlur event to handle the change of the font.

@zhuba-Ahhh
Copy link
Author

zhuba-Ahhh commented May 2, 2024

Hi @zhuba-Ahhh As like we are handling the onChange and onKeyDown event, we have to handle, onBlur event. My suggestion is to remove onKeyDown handler and just use the onBlur event to handle the change of the font.

Yes, you can try it like this?

image

@CARPEDIEM05
Copy link

Hi @zhuba-Ahhh , no this won't work as this will violate the max and min allowed size of the font.

@zhuba-Ahhh
Copy link
Author

I still think deleting the onKeyDown event is not a good idea

@CARPEDIEM05
Copy link

You might be right, who will be the right person to comment on this? You or someone else? I am new to this so I don't know.

@CARPEDIEM05
Copy link

According to me

  1. Either to remove the onKeyDown event and add the onBlur event
  2. We can include both the event

What do you think?

@ebads67
Copy link
Collaborator

ebads67 commented May 2, 2024

I'm not sure if this is an issue. To change the font size you need to select the text that you need to change the font size for. If there is no selection, then it changes the font only for the text you will enter after font change.

@StyleT
Copy link
Contributor

StyleT commented May 2, 2024

Hi @StyleT , I want to try this. This is the first time I am contributing to open-source. How can I assign this to myself?

Just comment here that you'll work on it and submit a PR ;) Even if 2+ people submit concurrent PRs (never happens, almost) - it's ok.

@CARPEDIEM05
Copy link

Hey @StyleT , I am working on it, i have submitted my code for review. So hope so that it will be assign to me.

pixelbyaj added a commit to pixelbyaj/lexical that referenced this issue May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution-week Issues that are good to be picked up for the contribution week good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants