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

Clean up of fields; have floating div render entire text box during edit #162

Merged
merged 6 commits into from
Apr 6, 2016
Merged

Clean up of fields; have floating div render entire text box during edit #162

merged 6 commits into from
Apr 6, 2016

Conversation

tmickel
Copy link
Contributor

@tmickel tmickel commented Apr 5, 2016

-Removes borderRect_ altogether as we're not using this.
-Fixes up positioning of fields. Instead of borderRect_, the click target (field path/shadow block) is now the "master copy" of the field position and size.
-Move some logic around border radii and colors for the fields so that we can access these properties when drawing the CSS-styled box.
-Finally, in field_textinput, implement the drawing, sizing, and styling for the CSS-styled floating div box.

The goal for this PR is to allow us to do animations on the box once it's focused. It makes it easier for us to customize and style text fields being edited.

I know the positioning of the box has a lot of magic numbers - as it did before. I'm pretty convinced it's as good as it's going to get, and I don't have great justifications for the numbers except for fiddling in each browser.

@tmickel
Copy link
Contributor Author

tmickel commented Apr 5, 2016

Also this possibly fixes #34 (RTL) - anything else to do on that front?

'font-family: sans-serif;',
'height: 100%;',
'margin: 0;',
'outline: none;',
'padding: 0 1px;',
'padding: 2px 0px;',

This comment was marked as abuse.

@rachel-fenichel
Copy link
Collaborator

Few nits then lgtm

@rachel-fenichel
Copy link
Collaborator

Magic numbers: https://imgur.com/FIcsv60

@tmickel tmickel merged commit fd27029 into scratchfoundation:develop Apr 6, 2016
picklesrus pushed a commit to picklesrus/scratch-blocks that referenced this pull request Aug 4, 2017
Affects SpriteSelector Pane, StageSelector Pane, Stage, MenuBar, Libraries Modal, Add/Import buttons, for Chrome, Ffx + Safari on Sierra.

Fixes scratchfoundation#162
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants