Feature request or bug report: textarea...

4 views
Skip to first unread message

Keith

unread,
Nov 20, 2009, 4:24:55 PM11/20/09
to mozilla-la...@googlegroups.com
What are the chances of having the bespin/textarea in about:jetpack be a
bit bigger, or better yet, some sort of funky jquery slidey thing that
lets us choose our own size.

It's a real pain in the ass when you're working on jetpacks longer than
12 lines, especially when bespin's mousewheel event doesn't block the
rest of the page from scrolling (that is a bug, in windows at least).

Thanks

-Keith

Paul O’Shannessy

unread,
Nov 20, 2009, 4:43:16 PM11/20/09
to mozilla-labs-jetpack
While perhaps not the solution you were looking for, you could try
using an external editor. If you have your code in a separate js file
and install it like you would any other jetpack, you can make changes,
then just refresh about:jetpack and your jetpack will be reloaded.

Aza

unread,
Nov 20, 2009, 8:44:18 PM11/20/09
to mozilla-la...@googlegroups.com
There has been a major upgrade to Bespin which, when we incorporate it, will let us have a bigger text area.

-- aza | ɐzɐ --


--

You received this message because you are subscribed to the Google Groups "mozilla-labs-jetpack" group.
To post to this group, send email to mozilla-la...@googlegroups.com.
To unsubscribe from this group, send email to mozilla-labs-jet...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mozilla-labs-jetpack?hl=.



Christian Sonne

unread,
Nov 20, 2009, 8:47:13 PM11/20/09
to mozilla-la...@googlegroups.com
Technically as it is, we could just set the height of the div it replaces to something higher, but that would make it less usable for lower resolutions.

I guess an option could be to let jQuery set it to max(what it is now, space available) or something like that...

-- cers / Christian Sonne

Aza

unread,
Nov 20, 2009, 8:48:53 PM11/20/09
to mozilla-la...@googlegroups.com
I tried that; but it didn't seem to work. Maybe I just failed?

-- aza | ɐzɐ --

Christian Sonne

unread,
Nov 20, 2009, 8:54:31 PM11/20/09
to mozilla-la...@googlegroups.com
Well, I'm quite sure that's what does it. If you fail to set a size, Bespin will keep growing a couple of pixels on each paint() (which is pretty often, and even more so when you use it).

I made a demo of it here: http://users.skumleren.net/cers/bugs/bespin/grow.html

Of course, you *may* have to do it before you init Bespin.

-- cers / Christian Sonne


Aza

unread,
Nov 20, 2009, 9:06:46 PM11/20/09
to mozilla-la...@googlegroups.com
Nice!

Well, then, patch time?

-- aza | ɐzɐ --

Christian Sonne

unread,
Nov 20, 2009, 10:00:57 PM11/20/09
to mozilla-la...@googlegroups.com
I find myself in the rather strange situation that at the same time, I can tell you why setting the width to max(300, window.innerHeight) does work, and why it doesn't work.

For some yet to be determined reason, window.innerHeight is exactly 300px on load - even when it plainly isn't. After load, I get the correct result. Setting bespin to max(300, the result) works.

If you apply the patch http://users.skumleren.net/cers/jetpackHeightTest.diff , you should get an alert with the window height on load (when you click Develop). Is it also 300 for you?


-- cers / Christian Sonne


Christian Sonne

unread,
Nov 20, 2009, 10:49:12 PM11/20/09
to mozilla-la...@googlegroups.com
On Sat, Nov 21, 2009 at 4:00 AM, Christian Sonne <frea...@gmail.com> wrote:
I find myself in the rather strange situation that at the same time, I can tell you why setting the width to max(300, window.innerHeight) does work, and why it doesn't work.

Err, that should be height, not width. (rest is still true)

Aza

unread,
Nov 20, 2009, 11:04:08 PM11/20/09
to mozilla-la...@googlegroups.com
Yes it is.

-- aza | ɐzɐ --

Hernan Rodriguez Colmeiro

unread,
Nov 20, 2009, 11:25:44 PM11/20/09
to mozilla-la...@googlegroups.com
On Sat, Nov 21, 2009 at 00:00, Christian Sonne <frea...@gmail.com> wrote:
> I find myself in the rather strange situation that at the same time, I can
> tell you why setting the width to max(300, window.innerHeight) does work,
> and why it doesn't work.
>
> For some yet to be determined reason, window.innerHeight is exactly 300px on
> load - even when it plainly isn't. After load, I get the correct result.
> Setting bespin to max(300, the result) works.
>
> If you apply the patch
> http://users.skumleren.net/cers/jetpackHeightTest.diff , you should get an
> alert with the window height on load (when you click Develop). Is it also
> 300 for you?
>

Maybe you already looked (or it doesn't have anything to do), but
bespin is being loaded into an iframe, which has the height set to
300px (class .editor-widget in index.css). Maybe that's why the alert
is saying 300px, because is being executed on a 300px iframe?

Hernán

Christian Sonne

unread,
Nov 20, 2009, 11:49:35 PM11/20/09
to mozilla-la...@googlegroups.com
On Sat, Nov 21, 2009 at 5:25 AM, Hernan Rodriguez Colmeiro <colm...@gmail.com> wrote:

Maybe you already looked (or it doesn't have anything to do), but
bespin is being loaded into an iframe, which has the height set to
300px (class .editor-widget in index.css). Maybe that's why the alert
is saying 300px, because is being executed on a 300px iframe?

Hernán


Silly me, I must have missed that somehow. I'll take a better look tomorrow, and provide a patch unless someone else beats me to it :-)

Thanks for letting me know!

Hernan Rodriguez Colmeiro

unread,
Nov 21, 2009, 10:44:18 AM11/21/09
to mozilla-la...@googlegroups.com
I came up with a patch for this. Although I don't think I beat you, is
just my humble contribution and I hope it's correctly coded ^^:

http://www.malditocrc.com.ar/peregrino/lab/jetpack/bespin-editor_height.diff

Hernán

PS: I'm also in the working of a jetpack to turn the bespin editor
into a "fullscreen" (just viewport space) editor.

Christian Sonne

unread,
Nov 21, 2009, 11:28:48 AM11/21/09
to mozilla-la...@googlegroups.com
Nice work!

Based on that patch, I've written up a less verbose version (that lives in editor.html instead)
http://users.skumleren.net/cers/jetpackHeight.diff


-- cers / Christian Sonne


Reply all
Reply to author
Forward
0 new messages