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

[TranslatorBundle]: Scale textarea to content #1337

Merged
merged 1 commit into from
Oct 13, 2016

Conversation

mattiasdelang
Copy link
Contributor

@mattiasdelang mattiasdelang commented Oct 12, 2016

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets

Scale textareas to the content that is being edited.

screen shot 2016-10-12 at 14 30 30

Textarea was too small for the content.

screen shot 2016-10-12 at 14 31 22

@Devolicious
Copy link
Contributor

indentation fix is correct, space between function and () needs to be reverted.

var $field = $(this);
var $width = $field.width();
Copy link
Contributor

Choose a reason for hiding this comment

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

vars only start with $ when it is a jQuery object

@@ -9,6 +9,11 @@ kunstmaanTranslatorBundle.inlineEdit = (function(window, undefined) {

$('.js-editable').each(function() {
var $field = $(this);
var width = $field.width();

$($field).on('shown', function(e, editable) {
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to double wrap $field here. $field is already a jQuery object

Remove spaces

Fix double wrap
@jockri jockri merged commit 08d83d9 into Kunstmaan:sf3 Oct 13, 2016
@jockri jockri added this to the 4.0.0 milestone Oct 13, 2016
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.

4 participants