components icon indicating copy to clipboard operation
components copied to clipboard

issues related to textarea autocomplete and "mention" component use-case

Open fxck opened this issue 9 years ago • 6 comments

autocomplete opens below, despite positionY being above and no space at the bottom

plunker http://plnkr.co/edit/XU4WU5pR3Eh6pio5Wc43?p=preview

reproduction start typing, once you hit 3 or more characters it will open at the bottom (it's gonna be barely visible)

info

  • this happens only if you fill in the options "afterwards", in my real use case it's after user starts typing anything after @ sign
  • when you tab out and focus again, it will be on the proper position

it's impossible to go up and down in the textarea, because autocomplete catches those key to move up and down in the list

plunker http://plnkr.co/edit/qDnL1tz5Fedc8gO4biDN?p=preview

reproduction put caret at the end and press up

info I think the autocomplete trigger should know whether it's on textarea or input https://github.com/angular/material2/blob/master/src/lib/autocomplete/autocomplete-trigger.ts#L253-L275 and only trigger these functions once the caret is at the very begining or the end.. got better idea?

md-autosize doesn't expand the textarea on load & autocomplete wrong position when parent is overflow: auto

plunker http://plnkr.co/edit/uXyUwJwHJWlPKHGICkZo?p=preview

reproduction

  • open plunker - textarea will have scroll in it (first problem)
  • start typing - textarea height will adjust, parent element scroll will take over
  • scroll on the bottom, focus in, focus out, autocomplete panel will be way too much (scrollTop) above image

info I'm not sure the autosize problem is related to autocomplete, haven't really tried. The other problem could perhaps be solved by "attaching" the overlay to the parent, but there's no input in autocomplete to change overlay positioning setting. I need the scroll to be on the parent rather than in the textarea because the way I'm doing mentions is with overlay with highlights image that needs to scroll along the textarea.

cc @jelbourn @kara @crisbeto

fxck avatar Jun 16 '17 08:06 fxck

another thing is that I would like to completely take over what happens after I select an option, currently it will just replace the whole text with whatever was selected.. I think there should be a way to prevent this https://github.com/angular/material2/blob/master/src/lib/autocomplete/autocomplete-trigger.ts#L349-L352

all in all, autocomplete is a bit one dimensional at the moment, but it shouldn't be hard to change it..

fxck avatar Jun 16 '17 11:06 fxck

I am looking for this component, is this in development stage ? If its beta is available also then I would like to use it. @fxck please suggest

Anoop-Goudar avatar Sep 08 '17 07:09 Anoop-Goudar

It looks like autocomplete has undergone quite a bit of change since you opened this issue. I was not able to reproduce it now. If you are still seeing this let us know and we can investigate with a new reproduction.

josephperrott avatar Sep 27 '17 16:09 josephperrott

I'm pretty sure most of the problems are still there, the only difference is that those plunkers stopped working. I'll try to reproduce it again on stackblitz over the weekend.

fxck avatar Sep 30 '17 12:09 fxck

Closing because this issue has been inactive for 2 weeks or more after follow up was requested.

wagnermaciel avatar Aug 13 '20 23:08 wagnermaciel

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.