Comments
60 total · 60 loaded
It seems like one purpose of an autocomplete box is help you avoid typos, so that makes it less useful.
Yes, it will autocomplete the most popular domains first, then known registered domains, and then fall back to appending popular TLDs.
The reason is that it's impossible to enumerate all domains. gTLDs (like .com, .info) mostly publish their zone files, but ccTLDs (like .cn, .de) usually don't.
But maybe you're right. After reading these comments, it's clearly confusing to people.
$ lynx doesnotexist2
Looking up doesnotexist2 first
Looking up www.doesnotexist2.com, guessing...
Looking up www.doesnotexist2.edu, guessing...
Looking up www.doesnotexist2.net, guessing...
Looking up www.doesnotexist2.org, guessing...
Can't Access `file://localhost/home/user/doesnotexist2'I guess this behavior helps to autocomplete the domain extension for less-known domains that are not in the search list.
This affects the functionality, too. It is in fact introducing latency by using keyup instead of keydown. Feels bad.
I think you have this wrong, actions generally occur on button release, until that you can move the mouse cursor to a different target, tab to another control, use [ESC] to cancel, and so on. Typing, moving a slider with the cursor keys, and similar things that make use of key repetition while holding down the key are the exception to this.
TAB is otherwise immediate, as is ESC, and the examples of typing, as well. So I'm left wondering, how do they have it wrong?
Because they listed the exceptions to the "act on keyup" rule
Key up is used for when it’s important to only have one occurrence of that event.
Technically you could write code that made key down only react once. But the logical separation makes some sense.
But for reference browsers fire the keypress event on keyup
Edit: I think people are misunderstanding me. I’m asking for an explanation of why, when you have a button focused, pressing Space activates on key up, rather than key down like literally everything else on the keyboard, including Enter on a focused button. (Mouse activates on release.)
These two interactions should behave identically:
- Hover over a button, press mouse button 1, release button 1.
- Tab over to a button, press spacebar, release spacebar.
Why on-screen buttons are UX'd to behave this way is a logical follow-up question. I'd wager that it gives a means to bail out of the clicking (e.g. by moving the mouse out of the on-screen button before releasing mousebutton 1, or by pressing Esc while having spacebar still depressed).
You’re only answering half of the inconsistency: because Enter activates buttons like any other key, on keydown.
I think you could get a lot closer by framing this as an optimization problem, where you use the full alphabet dictionary, but add a residual prediction which aims to cover as much of the remaining domain name tree as possible weighted by popularity. This tree could then be pre-baked and stored with the same system. This would probably get you p99 0ms even in Australia.
The time it takes to press a key is a reasonable target to aim at for API latency I suppose, but it is still an arbitrary target. Waiting to display until keyUp just adds more latency if your API is faster. Having it synced with keyUp doesn't make it feel more immediate to me.
Now the traversal can be done completely via CDN lookups!
> And on keyUp (the user releases the key), we render the suggestions.
Interestingly Ctrl+V on OP's website does update immediately when Ctrl+V is pressed.