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

Bug in textareas with tabbing with multiple lines selected #81

Open
dirkkelly opened this issue Jan 12, 2010 · 4 comments
Open

Bug in textareas with tabbing with multiple lines selected #81

dirkkelly opened this issue Jan 12, 2010 · 4 comments

Comments

@dirkkelly
Copy link

This is related to 0.9.0, and isn't ridiculously complicated (I know zero about prototype though).

Basically, using the tab within textfields feature in 0.9.0 rc, I have this annoying jumping issue whenever i delete a 'tab', I was mucking around with some javascript and the solution is just to remove the overflow (causing a scrollbar) on the textarea.

I don't use prototype, jQuery kid myself, so I did some Googling, there are a heap of examples on Stack Overflow, but they all seemed to behave a bit weirdly.

More Googling and I came accross this robust (but probably a bit over-zealous) alternative.
http://scottmoonen.com/2008/07/08/unobtrusive-javascript-expandable-textareas/

It worked really well, and meant that I could easily edit my nicely tabbed code.

Could this be something to be considered making it into core?

@jlong
Copy link
Member

jlong commented Feb 17, 2010

What is the issue with deleting a tab?

I'm definitely interested in exploring the idea of making textareas expand to be large enough to show all of their content. But I'd like to see more work on this before it is incorporated into core. It could be tricky and present problems when using it in the multiple tab page editing interface.

@dirkkelly
Copy link
Author

I can't believe I wrote 'tab', how unhelpful.

I actually meant the character, as in \t. Right now in prototype we can use the tab feature to push text forward within our content. What I have noticed is that if you ( 'tab' | \t ) or delete a ( 'tab' | \t ) at a point where the top of the content has been scrolled away, you will be thrown back up to the top of the content.

This can't happen if you have a text box the size of the content, plus it's really easy to see how the code is laid out.

As for content tabs, it shouldn't at all be an issue, all of the navigation and modification of content tabs is done above the text area, so they can all be a variety of different sizes. I did a bit of testing editing the inline styles on a page and they worked fine.

One problem could be the location of the save and create buttons being thrown about the page, but we could always do what Google do in mail and duplicate those actions above the content.

I'll put more effort into coming up with a solution in Prototype.

@phobetron
Copy link

I second this. The behavior attached to the textarea is so annoying I'd prefer not to have Radiant "help" edit code.

@jlong
Copy link
Member

jlong commented Apr 13, 2011

I like the idea of making the textareas autosize. @dirkkelly please feel free to work on this.

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

No branches or pull requests

3 participants