# Incrementable

Published articles for Incrementable.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Incrementable length values in text fields

DevFeed: [Incrementable length values in text fields](<https://devfeed.tech/articles/incrementable-length-values-in-text-fields-51989.md>)

Original publisher: [Read original article](<https://lea.verou.me/2011/02/incrementable-length-values-in-text-fields/>)

Author: Lea Verou

Published: 2011-02-14T00:00:00Z

Content type: tutorial

Language: en

Sources: [Lea Verou's blog](<https://devfeed.tech/sources/lea-verou-s-blog.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [GUI](<https://devfeed.tech/topics/gui.md>), [constructor](<https://devfeed.tech/topics/constructor.md>), [bug](<https://devfeed.tech/topics/bug.md>), [GitHub](<https://devfeed.tech/topics/github.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [bug](<https://devfeed.tech/tags/bug.md>), [code](<https://devfeed.tech/tags/code.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [github](<https://devfeed.tech/tags/github.md>), [incrementable](<https://devfeed.tech/tags/incrementable.md>), [js](<https://devfeed.tech/tags/js.md>), [keyboard](<https://devfeed.tech/tags/keyboard.md>), [original](<https://devfeed.tech/tags/original.md>), [releases](<https://devfeed.tech/tags/releases.md>)

### AI overview

A developer implements incrementable or decrementable length values in editable text fields using the up and down arrow keys. The implementation supports modifier keys and configurable units, and the author notes an Opera caret-position bug.

### Source excerpt

I always loved that Firebug and Dragonfly feature that allows you to increment or decrement a <length> value by pressing the up and down keyboard arrows when the caret is over it. I wished my Front Trends slides supported it in the editable examples, it would make presenting so much easier. So, I decided to implement the functionality, to use it in my next talk. If you still have no idea what I'm talking about, you can see a demo here: View demo You may configure it so that it only does that when modifiers (alt, ctrl and/or shift) are used by providing a second argument to the constructor and/or change the units supported by filling in the third argument. However, bear in mind that holding down the Shift key will make it increment by ±10 instead of ±1 and that's not configurable (it would add too much unneeded complexity, I'm not even sure whether it's a good idea to make the other thing configurable either). You may download it or fork it from it's Github repo. And if you feel creative, you may improve it by fixing an Opera bug I gave up on: When the down arrow is pressed, the caret moves to the end of the string, despite the code telling it not to.