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

[iOS] Fix edit box text are when caps lock is on #18738

Open
wants to merge 3 commits into
base: v3
Choose a base branch
from

Conversation

saumyamukul
Copy link
Contributor

@saumyamukul saumyamukul commented Mar 16, 2018

Fix for #18739

New behavior

screen shot 2018-03-16 at 5 29 06 pm

@drelaptop drelaptop added this to the 3.18 milestone May 22, 2018
@drelaptop drelaptop self-requested a review May 22, 2018 08:48
float rightPadding = padding;
if(capsOn){
// Need to pad rect on right to account for right image view
rightPadding = std::max(padding, (float)self.rightView.frame.size.width + RIGHT_VIEW_PADDING);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RIGHT_VIEW_PADDING should calc Scale, like CC_EDIT_BOX_PADDING did

float padding = CC_EDIT_BOX_PADDING * glview->getScaleX() / glview->getContentScaleFactor();


#define RIGHT_VIEW_PADDING 5.0f
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RIGHT_VIEW_PADDING -> CAPS_LOCK_PADDING is better, since it's only change padding when caps lock is on

Copy link
Contributor

@drelaptop drelaptop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And your modified have effect on all padding when single line mode, you should test other single line cases. it had bad effect when I tested.

refer to this screenshot:

@drelaptop
Copy link
Contributor

img_0300

@drelaptop drelaptop removed this from the 3.17.1 milestone Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants