Hacker News new | ask | show | jobs
by jpwgarrison 2557 days ago
> like disabling selecting text when you shouldn't be able to

This is the worst thing in computers. Why would you EVER _block_ the ability to select text? I am engaged enough to want to select something you made! Embrace that, don't stop it!

5 comments

Think of all the thousands of tiny snippets of text and single Unicode characters that make up a UI. You definitely don't want to be able to select snippets within most controls, because selection interferes with using the control.

Examples: the text in a menu item, the text in a button, the Unicode x in a close icon, the bar between menus.

This is really noticeable in a few web applications where you can select the wrong thing and it interferes severely with using the UI (I have experienced this with Windows and Android).

Yes, you usually want to be able to select the main text. However many mobile UI frameworks just disable all selection, because that is the easiest way to also disable selection within UI controls (managing this issue is actually quite difficult from my experience writing a HTML UI framework).

In other words, HTML UI frameworks are still far behind native frameworks and actually not really usable yet.
In other words, poorly written components don't work well: which happens in other GUI toolkits and not just HTML.

Good HTML UI frameworks don't make this mistake.

Are there any good HTML UI frameworks yet?
So long as you don't want an OS native UI, yes I think so.

For example I use Visual Studio Code every day and the UI seems pretty good to me (panels, menus, tabs, check boxes, combos etc). I am presuming it uses a component framework (although I admit I haven't looked at the source).

I got one. Because my electron app is a game. I don't want you interacting with text as text, it's supposed to be more of a "texture" like one would expect from a native DirectX implementation
This is one of the reasons I despise touching Windows. Why on earth are error dialog boxes not selectable??
Yeah. However, when the dialog is focused you can press ctrl+c to copy it's contents to the clipboard.
Who thought this was a good UX?
The same people who wrote the Windows API, I guess.
WHAT?! This changes everything.
To simultaneously answer many of the "usually you don't want X to be selected":

So don't always allow selecting everything. If you start your selection inside "content", constrain to content, don't select labels. If you start on a label, select labels and maybe content too.

Native apps do this all the time in small degrees, people are used to it: "select all" selects content, not chrome, and it's context-sensitive in many cases (e.g. select all in a folder doesn't select parent folders even if they're visible).

Don't block selection please.

I don't want to select text in a button
having encountered some buttons with significant amounts of text: nothing is off-limits IMO. frequently tho, yea, "ok" isn't useful to allow to be selected.

On the other hand, getting people to copy what they see rather than read it out loud incorrectly can, pretty often, cut several rounds of back-and-forth out of remote tech support. It seems insane because it is, but yes - copying text in a button rather than having them say "I clicked the yes button" (when no such button exists) is a useful feature.

On the other hand I hate apps that have user interface elements where you can select the text by accident instead of interacting with the element that contains the text.

Imagine what it would be like if a click and drag on a window title bar moved the window but a click and drag on the text part of the title bar just selected text.

Back in the Amiga days there was a nice little app that let you go into selection mode and then draw a rect around anything and it would pseudo-ocr it. Surely something like that exists on current machines, but I havn't seen it.

I know what you’re saying. Our company settled on a well known cloud app for ERP/CRM and daily I deal with copying and pasting something from it that invariably brings along extra text/ui elements that I didn’t want. Sometimes it’s just extraneous space, sometimes it’s extra text I don’t even realize was highlighted.

Another example are tables that have selection boxes for records or “action” links in each row like print or view. If I could select this table without those columns coming along for the copy ride I’d cut at least one if not a few steps out for every time I copy/paste something.