Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Live Free or Live in Massachusetts.


devel / comp.lang.javascript / Re: styling <input type=text> elements

SubjectAuthor
* styling <input type=text> elementsluserdroog
+* Re: styling <input type=text> elementsBen Bacarisse
|+* Re: styling <input type=text> elementsluserdroog
||`* Re: styling <input type=text> elementsMichael Haufe (TNO)
|| `- Re: styling <input type=text> elementsluserdroog
|`* Re: styling <input type=text> elementsluserdroog
| `* Re: styling <input type=text> elementsBen Bacarisse
|  `* Re: styling <input type=text> elementsluserdroog
|   `- Re: styling <input type=text> elementsluserdroog
+* Re: styling <input type=text> elementsJJ
|`- Re: styling <input type=text> elementsThe Natural Philosopher
+* Re: styling <input type=text> elementsDr.Kral
|`- Re: styling <input type=text> elementsThe Natural Philosopher
`- Re: styling <input type=text> elementsArno Welzel

1
styling <input type=text> elements

<112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=18202&group=comp.lang.javascript#18202

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ac8:7d90:0:b0:403:b221:e4b4 with SMTP id c16-20020ac87d90000000b00403b221e4b4mr8235qtd.1.1690551063172;
Fri, 28 Jul 2023 06:31:03 -0700 (PDT)
X-Received: by 2002:a05:6870:a889:b0:1bb:52f7:4da8 with SMTP id
eb9-20020a056870a88900b001bb52f74da8mr3288943oab.9.1690551062900; Fri, 28 Jul
2023 06:31:02 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Fri, 28 Jul 2023 06:31:02 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=24.107.183.247; posting-account=G1KGwgkAAAAyw4z0LxHH0fja6wAbo7Cz
NNTP-Posting-Host: 24.107.183.247
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com>
Subject: styling <input type=text> elements
From: luser.droog@gmail.com (luserdroog)
Injection-Date: Fri, 28 Jul 2023 13:31:03 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1500
 by: luserdroog - Fri, 28 Jul 2023 13:31 UTC

After much searching and struggling I've discovered that the
only way to adjust the size of an <input type=text> element is
with its size="number-of-chars" attribute.

Are there any common workarounds to let me style the thing
to (at least appear to) fill its containing box? Can I just simulate
one with a web component and having it look different but
feed a hidden <input> element in its shadow dom?

I suppose the answer to that last question is probably Yes.
Does this sound like a good idea?

Re: styling <input type=text> elements

<87fs57g8bc.fsf@bsb.me.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=18203&group=comp.lang.javascript#18203

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.usenet@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.javascript
Subject: Re: styling <input type=text> elements
Date: Fri, 28 Jul 2023 20:11:35 +0100
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <87fs57g8bc.fsf@bsb.me.uk>
References: <112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="b8f7e324aecb05e9b3b48a4ce3159635";
logging-data="2438638"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19xghyJ75OOfZOBW2Pp7FnfHPs6dZsGrfE="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:9xEPv4tNCrlmUxINMv8gFzUztdk=
sha1:G3nRJWQtBK3Wz54ryx3nMd2Rkss=
X-BSB-Auth: 1.dd5b98ac5a8e89a83bb5.20230728201135BST.87fs57g8bc.fsf@bsb.me.uk
 by: Ben Bacarisse - Fri, 28 Jul 2023 19:11 UTC

luserdroog <luser.droog@gmail.com> writes:

> After much searching and struggling I've discovered that the
> only way to adjust the size of an <input type=text> element is
> with its size="number-of-chars" attribute.

Can you say more? Are you limited to what browsers you must support. I
thought you could style the width in most.

--
Ben.

Re: styling <input type=text> elements

<1y0ie5i9jgs61$.1tdr2fndst4hy$.dlg@40tude.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=18204&group=comp.lang.javascript#18204

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jj4public@outlook.com (JJ)
Newsgroups: comp.lang.javascript
Subject: Re: styling <input type=text> elements
Date: Sat, 29 Jul 2023 17:05:16 +0700
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <1y0ie5i9jgs61$.1tdr2fndst4hy$.dlg@40tude.net>
References: <112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="7100fd8f1e9659d5b9c832a12b0d3f1f";
logging-data="2736285"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ntfTjX1vIxrtpIGU6OOZXA5B923Pmdf8="
User-Agent: 40tude_Dialog/2.0.15.84
Cancel-Lock: sha1:M6e3CUMdqUQzAAKrEyKHyE3MF2k=
X-Face: \*\`0(1j~VfYC>ebz[&O.]=,Nm\oRM{of,liRO#7Eqi4|!]!(Gs=Akgh{J)605>C9Air?pa d{sSZ09u+A7f<^paR"/NH_#<mE1S"hde\c6PZLUB[t/s5-+Iu5DSc?P0+4%,Hl
X-Bitcoin: 1LcqwCQBQmhcWfWsVEAeyLchkAY8ZfuMnS
 by: JJ - Sat, 29 Jul 2023 10:05 UTC

On Fri, 28 Jul 2023 06:31:02 -0700 (PDT), luserdroog wrote:
> After much searching and struggling I've discovered that the
> only way to adjust the size of an <input type=text> element is
> with its size="number-of-chars" attribute.
>
> Are there any common workarounds to let me style the thing
> to (at least appear to) fill its containing box? Can I just simulate
> one with a web component and having it look different but
> feed a hidden <input> element in its shadow dom?
>
> I suppose the answer to that last question is probably Yes.
> Does this sound like a good idea?

Chances are that, whatever CSS you've tried to apply to the INPUT element,
is overidden by a higher priority styles. Meaning that, you styles aren't
defined with a CSS selector which is specific enough to have a higher
priority than the existing one.

Content in Shadow DOM is similar (but not the same) to a separate document
in an IFRAME. CSS rules by default, don't apply across Shadow DOM unless the
correct CSS selector is used.

Re: styling <input type=text> elements

<il2acidhgre2v4nd6c3abunsc0436g41ah@4ax.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=18205&group=comp.lang.javascript#18205

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx07.iad.POSTED!not-for-mail
From: Dr.Kral@nyc.rr.com
Newsgroups: comp.lang.javascript
Subject: Re: styling <input type=text> elements
Reply-To: Dr_Kral@nyc.rr.com
Message-ID: <il2acidhgre2v4nd6c3abunsc0436g41ah@4ax.com>
References: <112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com>
X-Newsreader: Forte Agent 5.00/32.1171
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 37
X-Complaints-To: abuse@easynews.com
Organization: Easynews - www.easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Sat, 29 Jul 2023 08:57:16 -0400
X-Received-Bytes: 1991
 by: Dr.Kral@nyc.rr.com - Sat, 29 Jul 2023 12:57 UTC

On Fri, 28 Jul 2023 06:31:02 -0700 (PDT), luserdroog
<luser.droog@gmail.com> wrote in
<112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com>:

>After much searching and struggling I've discovered that the
>only way to adjust the size of an <input type=text> element is
>with its size="number-of-chars" attribute.
>
>Are there any common workarounds to let me style the thing
>to (at least appear to) fill its containing box? Can I just simulate
>one with a web component and having it look different but
>feed a hidden <input> element in its shadow dom?
>
>I suppose the answer to that last question is probably Yes.
>Does this sound like a good idea?

If you have
<input id='a' size='10' value='123'>
then adjust the size with
document.getElementById('a').setAttribute('size', 15) ;

If you have
<input id='b' style="width:10em" value='123'>
then adjust the width with
document.getElementById('b').style.width='25em' ;

You probably want to investigate getting width of a string and using a
fixed width font to get things to fit. "onchange" is useful.

You could also replace the input element with a bordered string inline
after the value is entered.
<span style="border:red 1px solid;">12345</span>

Re: styling <input type=text> elements

<ua3fup$2lmos$3@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=18206&group=comp.lang.javascript#18206

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.lang.javascript
Subject: Re: styling <input type=text> elements
Date: Sat, 29 Jul 2023 17:49:29 +0100
Organization: A little, after lunch
Lines: 38
Message-ID: <ua3fup$2lmos$3@dont-email.me>
References: <112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com>
<1y0ie5i9jgs61$.1tdr2fndst4hy$.dlg@40tude.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 29 Jul 2023 16:49:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ceb4a33e3ce2bbadc429607c8d317811";
logging-data="2808604"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/3989nIPxTAAF8jjc9c1jq+it359pdj14="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:78QYnIiAXO39+qYsv6ihH7gty+I=
Content-Language: en-GB
In-Reply-To: <1y0ie5i9jgs61$.1tdr2fndst4hy$.dlg@40tude.net>
 by: The Natural Philosop - Sat, 29 Jul 2023 16:49 UTC

On 29/07/2023 11:05, JJ wrote:
> On Fri, 28 Jul 2023 06:31:02 -0700 (PDT), luserdroog wrote:
>> After much searching and struggling I've discovered that the
>> only way to adjust the size of an <input type=text> element is
>> with its size="number-of-chars" attribute.
>>
>> Are there any common workarounds to let me style the thing
>> to (at least appear to) fill its containing box? Can I just simulate
>> one with a web component and having it look different but
>> feed a hidden <input> element in its shadow dom?
>>
>> I suppose the answer to that last question is probably Yes.
>> Does this sound like a good idea?
>
> Chances are that, whatever CSS you've tried to apply to the INPUT element,
> is overidden by a higher priority styles. Meaning that, you styles aren't
> defined with a CSS selector which is specific enough to have a higher
> priority than the existing one.
>
> Content in Shadow DOM is similar (but not the same) to a separate document
> in an IFRAME. CSS rules by default, don't apply across Shadow DOM unless the
> correct CSS selector is used.

Firefox inspector is your friend here. For the record < input > does in
fact respond to style= "width: X px".

But the problem is that until you have written as many pages as I seem
to have the habit of turning margins paddings, and everything else to
zero on your <body> definition leads to many strange interpretations by
the browser itself that are different between browsers, oh, and if you
want to preserve fonts across browser and platforms embed those, as well.

--
How fortunate for governments that the people they administer don't think.

Adolf Hitler

Re: styling <input type=text> elements

<ua3g58$2loj5$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=18207&group=comp.lang.javascript#18207

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.lang.javascript
Subject: Re: styling <input type=text> elements
Date: Sat, 29 Jul 2023 17:52:56 +0100
Organization: A little, after lunch
Lines: 49
Message-ID: <ua3g58$2loj5$1@dont-email.me>
References: <112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com>
<il2acidhgre2v4nd6c3abunsc0436g41ah@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 29 Jul 2023 16:52:56 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ceb4a33e3ce2bbadc429607c8d317811";
logging-data="2810469"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6ApFv+FQjF6nSVXT9869kfqyyeSmfPvs="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:hXwvh11rIkgqb9a7Dlbf+8zUw3c=
In-Reply-To: <il2acidhgre2v4nd6c3abunsc0436g41ah@4ax.com>
Content-Language: en-GB
 by: The Natural Philosop - Sat, 29 Jul 2023 16:52 UTC

On 29/07/2023 13:57, Dr.Kral@nyc.rr.com wrote:
> On Fri, 28 Jul 2023 06:31:02 -0700 (PDT), luserdroog
> <luser.droog@gmail.com> wrote in
> <112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com>:
>
>> After much searching and struggling I've discovered that the
>> only way to adjust the size of an <input type=text> element is
>> with its size="number-of-chars" attribute.
>>
>> Are there any common workarounds to let me style the thing
>> to (at least appear to) fill its containing box? Can I just simulate
>> one with a web component and having it look different but
>> feed a hidden <input> element in its shadow dom?
>>
>> I suppose the answer to that last question is probably Yes.
>> Does this sound like a good idea?
>
>
> If you have
> <input id='a' size='10' value='123'>
> then adjust the size with
> document.getElementById('a').setAttribute('size', 15) ;
>
> If you have
> <input id='b' style="width:10em" value='123'>
> then adjust the width with
> document.getElementById('b').style.width='25em' ;
>
> You probably want to investigate getting width of a string and using a
> fixed width font to get things to fit. "onchange" is useful.
>
> You could also replace the input element with a bordered string inline
> after the value is entered.
> <span style="border:red 1px solid;">12345</span>
>
>
Make your <input> a nice width and allow overflow in it.
The rest of the default HTML entry should be replaced with javascripted
buttons apart from the drop down menus which need to be utterly restyled
to not look like something out of the 1980s. File upload is another one
where you have to overlay the default styles.

>
>

--
Climate Change: Socialism wearing a lab coat.

Re: styling <input type=text> elements

<kimip8Fi2csU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=18209&group=comp.lang.javascript#18209

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet@arnowelzel.de (Arno Welzel)
Newsgroups: comp.lang.javascript
Subject: Re: styling <input type=text> elements
Date: Sun, 30 Jul 2023 09:45:45 +0200
Lines: 15
Message-ID: <kimip8Fi2csU1@mid.individual.net>
References: <112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Trace: individual.net LgvSHO1sR2AwGdnSbtXxPwBClcKJXPw+YmSga5XJy8s2okkk9R
Cancel-Lock: sha1:oNi65LfCq9CxTxMzvctyiJMbuwA= sha256:Sh8nCrq95JEAcvUyg/JoD2hn3Lw/TKWOq5cW5MQALzM=
Content-Language: de-DE
In-Reply-To: <112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com>
 by: Arno Welzel - Sun, 30 Jul 2023 07:45 UTC

luserdroog, 2023-07-28 15:31:

> After much searching and struggling I've discovered that the
> only way to adjust the size of an <input type=text> element is
> with its size="number-of-chars" attribute.

No. You can also set its width using CSS and "width". Also the distance
from the text and the surrounding border can be styled as well as all
colours.

--
Arno Welzel
https://arnowelzel.de

Re: styling <input type=text> elements

<fe496b8d-99b2-40f4-9d13-ef2e52ee25b5n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=18212&group=comp.lang.javascript#18212

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ad4:5a10:0:b0:63d:6b5:beef with SMTP id ei16-20020ad45a10000000b0063d06b5beefmr33427qvb.7.1690811632364;
Mon, 31 Jul 2023 06:53:52 -0700 (PDT)
X-Received: by 2002:a05:6870:a8aa:b0:1bb:8ad0:1fa7 with SMTP id
eb42-20020a056870a8aa00b001bb8ad01fa7mr12272362oab.7.1690811632060; Mon, 31
Jul 2023 06:53:52 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Mon, 31 Jul 2023 06:53:51 -0700 (PDT)
In-Reply-To: <87fs57g8bc.fsf@bsb.me.uk>
Injection-Info: google-groups.googlegroups.com; posting-host=24.107.183.247; posting-account=G1KGwgkAAAAyw4z0LxHH0fja6wAbo7Cz
NNTP-Posting-Host: 24.107.183.247
References: <112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com> <87fs57g8bc.fsf@bsb.me.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fe496b8d-99b2-40f4-9d13-ef2e52ee25b5n@googlegroups.com>
Subject: Re: styling <input type=text> elements
From: luser.droog@gmail.com (luserdroog)
Injection-Date: Mon, 31 Jul 2023 13:53:52 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3118
 by: luserdroog - Mon, 31 Jul 2023 13:53 UTC

On Friday, July 28, 2023 at 2:11:45 PM UTC-5, Ben Bacarisse wrote:
> luserdroog <luser...@gmail.com> writes:
>
> > After much searching and struggling I've discovered that the
> > only way to adjust the size of an <input type=text> element is
> > with its size="number-of-chars" attribute.
> Can you say more? Are you limited to what browsers you must support. I
> thought you could style the width in most.
>

Thanks for all the responses. To the questions, it's a very simple
single page web app with only a half dozen users and I'm also the
primary user/developer/tester.

The context is a text edit widget that manifests inside a spreadsheet-like
table view of personnel scheduling data. Clicking a cell turns the
<td><span/></td> into a <td><input></td> and then onchange or onblur on
the input changes it back to a span.

eg.
https://github.com/luser-dr00g/luser-dr00g.github.io/blob/master/cm-tool.html#L1092

function addGridNotesWidgets(){
let notes = grid.querySelectorAll( ".notes" );
notes.forEach( (note) => {
let idx = note.dataset.index;
const clickHandler = (event) => {
let edit = document.createElement( "input" );
edit.value = global.data[ idx ][5];
//edit.size = 30; // tweak the size or width here?
let target = note.childNodes[0];
note.replaceChild( edit, target );
note.parentNode.removeEventListener( "click", clickHandler );
const done = (event) => {
if( edit.value == "" ) edit.value = "\t";
target.textContent = edit.value;
changeNotes( idx, edit.value );
edit.parentNode.replaceChild( target, edit );
saveData();
output();
};
edit.addEventListener( "change", done );
edit.addEventListener( "blur", done );
edit.focus();
};
note.parentNode.addEventListener( "click", clickHandler );
});
}

Re: styling <input type=text> elements

<983d2dd7-9c75-4b12-bc57-0a11b1cf1114n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=18213&group=comp.lang.javascript#18213

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ac8:5906:0:b0:403:c38f:65f7 with SMTP id 6-20020ac85906000000b00403c38f65f7mr44507qty.0.1690811883862;
Mon, 31 Jul 2023 06:58:03 -0700 (PDT)
X-Received: by 2002:a05:6870:7694:b0:1b0:20bd:eef with SMTP id
dx20-20020a056870769400b001b020bd0eefmr12715875oab.2.1690811883502; Mon, 31
Jul 2023 06:58:03 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Mon, 31 Jul 2023 06:58:03 -0700 (PDT)
In-Reply-To: <87fs57g8bc.fsf@bsb.me.uk>
Injection-Info: google-groups.googlegroups.com; posting-host=24.107.183.247; posting-account=G1KGwgkAAAAyw4z0LxHH0fja6wAbo7Cz
NNTP-Posting-Host: 24.107.183.247
References: <112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com> <87fs57g8bc.fsf@bsb.me.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <983d2dd7-9c75-4b12-bc57-0a11b1cf1114n@googlegroups.com>
Subject: Re: styling <input type=text> elements
From: luser.droog@gmail.com (luserdroog)
Injection-Date: Mon, 31 Jul 2023 13:58:03 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1922
 by: luserdroog - Mon, 31 Jul 2023 13:58 UTC

On Friday, July 28, 2023 at 2:11:45 PM UTC-5, Ben Bacarisse wrote:
> luserdroog <luser...@gmail.com> writes:
>
> > After much searching and struggling I've discovered that the
> > only way to adjust the size of an <input type=text> element is
> > with its size="number-of-chars" attribute.
> Can you say more? Are you limited to what browsers you must support. I
> thought you could style the width in most.
>

Oops, other question. Nope, I can safely assume/require the latest versions
of chrome or firefox. In fact I'm relying on this for the next rewrite
that'll use the new compression/decompression stuff.

Re: styling <input type=text> elements

<877cqgw07f.fsf@bsb.me.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=18214&group=comp.lang.javascript#18214

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.usenet@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.javascript
Subject: Re: styling <input type=text> elements
Date: Mon, 31 Jul 2023 16:49:08 +0100
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <877cqgw07f.fsf@bsb.me.uk>
References: <112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com>
<87fs57g8bc.fsf@bsb.me.uk>
<983d2dd7-9c75-4b12-bc57-0a11b1cf1114n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="b326b269c93766db184fda50f82c858f";
logging-data="3483988"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+aaNbqcDBec7YrKa/Tl0ZtLrJWtvpodEA="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:LG4cshQ34n8BuxdEdYmfn/kFSqU=
sha1:yxkYuQbE+awC45vSm/w/a14txgs=
X-BSB-Auth: 1.327fdaebd5948f79478f.20230731164908BST.877cqgw07f.fsf@bsb.me.uk
 by: Ben Bacarisse - Mon, 31 Jul 2023 15:49 UTC

luserdroog <luser.droog@gmail.com> writes:

> On Friday, July 28, 2023 at 2:11:45 PM UTC-5, Ben Bacarisse wrote:
>> luserdroog <luser...@gmail.com> writes:
>>
>> > After much searching and struggling I've discovered that the
>> > only way to adjust the size of an <input type=text> element is
>> > with its size="number-of-chars" attribute.
>> Can you say more? Are you limited to what browsers you must support. I
>> thought you could style the width in most.
>
> Oops, other question. Nope, I can safely assume/require the latest versions
> of chrome or firefox. In fact I'm relying on this for the next rewrite
> that'll use the new compression/decompression stuff.

So now I don't know what the problem is!

--
Ben.

Re: styling <input type=text> elements

<0383ffc5-6fa7-46bc-beb4-0f260d41ad57n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=18215&group=comp.lang.javascript#18215

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a37:b683:0:b0:76a:dcfc:773a with SMTP id g125-20020a37b683000000b0076adcfc773amr32109qkf.5.1690821712539;
Mon, 31 Jul 2023 09:41:52 -0700 (PDT)
X-Received: by 2002:a05:6808:2021:b0:3a3:a8d1:1aa1 with SMTP id
q33-20020a056808202100b003a3a8d11aa1mr20531586oiw.2.1690821712140; Mon, 31
Jul 2023 09:41:52 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Mon, 31 Jul 2023 09:41:51 -0700 (PDT)
In-Reply-To: <877cqgw07f.fsf@bsb.me.uk>
Injection-Info: google-groups.googlegroups.com; posting-host=24.107.183.247; posting-account=G1KGwgkAAAAyw4z0LxHH0fja6wAbo7Cz
NNTP-Posting-Host: 24.107.183.247
References: <112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com>
<87fs57g8bc.fsf@bsb.me.uk> <983d2dd7-9c75-4b12-bc57-0a11b1cf1114n@googlegroups.com>
<877cqgw07f.fsf@bsb.me.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0383ffc5-6fa7-46bc-beb4-0f260d41ad57n@googlegroups.com>
Subject: Re: styling <input type=text> elements
From: luser.droog@gmail.com (luserdroog)
Injection-Date: Mon, 31 Jul 2023 16:41:52 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2244
 by: luserdroog - Mon, 31 Jul 2023 16:41 UTC

On Monday, July 31, 2023 at 10:49:18 AM UTC-5, Ben Bacarisse wrote:
> luserdroog <luser...@gmail.com> writes:
>
> > On Friday, July 28, 2023 at 2:11:45 PM UTC-5, Ben Bacarisse wrote:
> >> luserdroog <luser...@gmail.com> writes:
> >>
> >> > After much searching and struggling I've discovered that the
> >> > only way to adjust the size of an <input type=text> element is
> >> > with its size="number-of-chars" attribute.
> >> Can you say more? Are you limited to what browsers you must support. I
> >> thought you could style the width in most.
> >
> > Oops, other question. Nope, I can safely assume/require the latest versions
> > of chrome or firefox. In fact I'm relying on this for the next rewrite
> > that'll use the new compression/decompression stuff.
> So now I don't know what the problem is!
>

All good now. style="width:inherit" did the trick.
It's beautiful. sniff.

Re: styling <input type=text> elements

<0dfd4936-108b-4b2a-9f72-4253ffceefacn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=18216&group=comp.lang.javascript#18216

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ac8:5d8d:0:b0:403:f763:5c6a with SMTP id d13-20020ac85d8d000000b00403f7635c6amr38084qtx.12.1690822652517;
Mon, 31 Jul 2023 09:57:32 -0700 (PDT)
X-Received: by 2002:a05:6808:1491:b0:3a3:b8ab:c211 with SMTP id
e17-20020a056808149100b003a3b8abc211mr20275357oiw.4.1690822652272; Mon, 31
Jul 2023 09:57:32 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Mon, 31 Jul 2023 09:57:32 -0700 (PDT)
In-Reply-To: <0383ffc5-6fa7-46bc-beb4-0f260d41ad57n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=24.107.183.247; posting-account=G1KGwgkAAAAyw4z0LxHH0fja6wAbo7Cz
NNTP-Posting-Host: 24.107.183.247
References: <112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com>
<87fs57g8bc.fsf@bsb.me.uk> <983d2dd7-9c75-4b12-bc57-0a11b1cf1114n@googlegroups.com>
<877cqgw07f.fsf@bsb.me.uk> <0383ffc5-6fa7-46bc-beb4-0f260d41ad57n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0dfd4936-108b-4b2a-9f72-4253ffceefacn@googlegroups.com>
Subject: Re: styling <input type=text> elements
From: luser.droog@gmail.com (luserdroog)
Injection-Date: Mon, 31 Jul 2023 16:57:32 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2554
 by: luserdroog - Mon, 31 Jul 2023 16:57 UTC

On Monday, July 31, 2023 at 11:41:58 AM UTC-5, luserdroog wrote:
> On Monday, July 31, 2023 at 10:49:18 AM UTC-5, Ben Bacarisse wrote:
> > luserdroog <luser...@gmail.com> writes:
> >
> > > On Friday, July 28, 2023 at 2:11:45 PM UTC-5, Ben Bacarisse wrote:
> > >> luserdroog <luser...@gmail.com> writes:
> > >>
> > >> > After much searching and struggling I've discovered that the
> > >> > only way to adjust the size of an <input type=text> element is
> > >> > with its size="number-of-chars" attribute.
> > >> Can you say more? Are you limited to what browsers you must support. I
> > >> thought you could style the width in most.
> > >
> > > Oops, other question. Nope, I can safely assume/require the latest versions
> > > of chrome or firefox. In fact I'm relying on this for the next rewrite
> > > that'll use the new compression/decompression stuff.
> > So now I don't know what the problem is!
> >
> All good now. style="width:inherit" did the trick.
> It's beautiful. sniff.

Correction, it was
edit.style.width = td.offsetWidth + "px";
that finally worked.

Re: styling <input type=text> elements

<2ecc2758-0822-447d-af9b-3af767c7e977n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=18217&group=comp.lang.javascript#18217

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a5d:4146:0:b0:317:718a:e83c with SMTP id c6-20020a5d4146000000b00317718ae83cmr9905wrq.0.1690862365190;
Mon, 31 Jul 2023 20:59:25 -0700 (PDT)
X-Received: by 2002:a05:6870:3a13:b0:1ba:5c28:76f1 with SMTP id
du19-20020a0568703a1300b001ba5c2876f1mr14766932oab.4.1690862364905; Mon, 31
Jul 2023 20:59:24 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.88.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Mon, 31 Jul 2023 20:59:24 -0700 (PDT)
In-Reply-To: <fe496b8d-99b2-40f4-9d13-ef2e52ee25b5n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2603:6000:8900:6915:c0be:2f92:ffdd:6267;
posting-account=hYRygAoAAABkmvJVmPilz9Q1TOjgPQAq
NNTP-Posting-Host: 2603:6000:8900:6915:c0be:2f92:ffdd:6267
References: <112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com>
<87fs57g8bc.fsf@bsb.me.uk> <fe496b8d-99b2-40f4-9d13-ef2e52ee25b5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2ecc2758-0822-447d-af9b-3af767c7e977n@googlegroups.com>
Subject: Re: styling <input type=text> elements
From: tno@thenewobjective.com (Michael Haufe (TNO))
Injection-Date: Tue, 01 Aug 2023 03:59:25 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Michael Haufe (TNO) - Tue, 1 Aug 2023 03:59 UTC

On Monday, July 31, 2023 at 8:53:58 AM UTC-5, luserdroog wrote:
> [...]
> The context is a text edit widget that manifests inside a spreadsheet-like
> table view of personnel scheduling data. Clicking a cell turns the
> <td><span/></td> into a <td><input></td> and then onchange or onblur on
> the input changes it back to a span.

Is it not simpler to keep <td><input></td> and then with clicking toggle the readonly attribute?

The css :read-only selector will allow you to control appearance.

Re: styling <input type=text> elements

<5f591573-3660-4f1c-b2a9-86b246aa6c8fn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=18218&group=comp.lang.javascript#18218

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a05:622a:1887:b0:403:b014:538f with SMTP id v7-20020a05622a188700b00403b014538fmr78183qtc.10.1690986800539;
Wed, 02 Aug 2023 07:33:20 -0700 (PDT)
X-Received: by 2002:a9d:4f15:0:b0:6bc:b5dc:7b6d with SMTP id
d21-20020a9d4f15000000b006bcb5dc7b6dmr2993695otl.2.1690986800258; Wed, 02 Aug
2023 07:33:20 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Wed, 2 Aug 2023 07:33:19 -0700 (PDT)
In-Reply-To: <2ecc2758-0822-447d-af9b-3af767c7e977n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=24.107.183.247; posting-account=G1KGwgkAAAAyw4z0LxHH0fja6wAbo7Cz
NNTP-Posting-Host: 24.107.183.247
References: <112fa9f3-7d2d-4c3b-b417-655eb0776264n@googlegroups.com>
<87fs57g8bc.fsf@bsb.me.uk> <fe496b8d-99b2-40f4-9d13-ef2e52ee25b5n@googlegroups.com>
<2ecc2758-0822-447d-af9b-3af767c7e977n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5f591573-3660-4f1c-b2a9-86b246aa6c8fn@googlegroups.com>
Subject: Re: styling <input type=text> elements
From: luser.droog@gmail.com (luserdroog)
Injection-Date: Wed, 02 Aug 2023 14:33:20 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2676
 by: luserdroog - Wed, 2 Aug 2023 14:33 UTC

On Monday, July 31, 2023 at 10:59:34 PM UTC-5, Michael Haufe (TNO) wrote:
> On Monday, July 31, 2023 at 8:53:58 AM UTC-5, luserdroog wrote:
> > [...]
> > The context is a text edit widget that manifests inside a spreadsheet-like
> > table view of personnel scheduling data. Clicking a cell turns the
> > <td><span/></td> into a <td><input></td> and then onchange or onblur on
> > the input changes it back to a span.
> Is it not simpler to keep <td><input></td> and then with clicking toggle the readonly attribute?
>
> The css :read-only selector will allow you to control appearance.

Verry interesting. I completely hadn't considered that. With all the trouble
controlling the size of the inputs, I had written them off as part of "the real page"
in my vague design/imagination.

That would also solve the riddle of whether
to put the click handlers on the td or the spans (because sometimes the spans
had no content in which case they don't have a clickable area).
With <td><input></td> as a more permanent substructure, it's quite obvious that
the handlers should go on the input element.

Not swapping the elements in the dom means none of the dozens of lines of
code that do all that business. So, I'm loving this ideamore the more I think on it.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor