Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Add TextInput for Multi-line Text fields (with floating labels) #212

Closed
ThomasBurleson opened this issue Aug 28, 2014 · 4 comments
Closed
Labels
a11y This issue is related to accessibility type: feature ui: layout
Milestone

Comments

@ThomasBurleson
Copy link
Contributor

Specification: Multi-line Text Fields

image

@ThomasBurleson ThomasBurleson added this to the 0.0.6 milestone Aug 28, 2014
erbear added a commit to erbear/material that referenced this issue Nov 7, 2014
Multiline option with autoexpanding add as a value of type attribute.

angular#212
@langdonx
Copy link

Until 0.0.6 lands:

app.directive('multiline', ['$timeout', function($timeout) {
    return {
        restrict: 'A',
        compile: function(wrappedElement) {
            var element = wrappedElement[0],
                input = element.querySelector('input');

                element.innerHTML += '<textarea ng-model="value" class="ng-touched"></textarea>';

            $timeout(function() {
                element.querySelector('input').style.display = 'none';

                element.querySelector('textarea').addEventListener('blur', function() {
                    element.classList.remove('md-input-focused');
                });

                element.querySelector('textarea').addEventListener('focus', function() {
                    element.classList.add('md-input-focused');
                });
            }, 0)
        }
    }
}]);

@ThomasBurleson ThomasBurleson modified the milestones: 0.7.0-rc1, 0.6.0-rc1 Nov 18, 2014
@ThomasBurleson ThomasBurleson modified the milestones: 0.7.0, 0.8.0 Jan 6, 2015
@utopiaio
Copy link

utopiaio commented Jan 8, 2015

+1

@ajoslin ajoslin closed this as completed in 1c65369 Jan 8, 2015
@marcnoon
Copy link

marcnoon commented Jan 7, 2020

How about multiline labels... Instead of the word 'Title' … imagine where the label text was 243 words. Is it possible to expand the label dynamically or the place holder dynamically..

@Splaktar
Copy link
Member

Splaktar commented Jan 9, 2020

@marcnoon There are better avenues for troubleshooting or asking for help with your app. These include Stack Overflow, Gitter, the AngularJS Material forums, etc.

@Splaktar Splaktar modified the milestones: 0.8.3, 0.7.0 Jan 9, 2020
@angular angular locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a11y This issue is related to accessibility type: feature ui: layout
Projects
None yet
Development

No branches or pull requests

5 participants