Implement -moz-user-modify:write-only

UNCONFIRMED
Unassigned

Status

()

Core
General
--
enhancement
UNCONFIRMED
10 years ago
7 years ago

People

(Reporter: sephr, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
Build Identifier: 

-moz-user-modify:write-only should be implemented would be very helpful for making write-only (ie. characters replaced with asterisks '*' or black circles '●') text input areas.

Reproducible: Always

Steps to Reproduce:
1. Put -moz-user-modify:write-only in the style of a text input element
Actual Results:  
Nothing happens.

Expected Results:  
Text input element becomes write-only.

Workaround info for textarea:
<input type="password"/> is limited to a single line so the only way to make a write-only textarea would be to put a 0% opaque textarea over another textarea (or a div with -moz-appearance:textfield) that is updated and filled with an amount of asterisks equal to the length of the value of the invisible textarea while typed in.

Comment 1

10 years ago
Why?
(Reporter)

Comment 2

10 years ago
(In reply to comment #1)
> Why?
Why not?

Comment 3

10 years ago
What is the use-case for a whole text area to be hidden like this?

People mistype frequently, myself included and I consider myself a good typist. Making it impossible for users to see text in a large textarea I just can't see a reason for...
(In reply to comment #3)
> What is the use-case for a whole text area to be hidden like this?

*** ** *** **** *** *** **** *** ** **** ** *** * *** *** ************* ****** ** **** *** *** * ********* ** * **** *****
(Reporter)

Comment 5

10 years ago
Well I was thinking of it as a way to input stuff like multi-line passwords (most likely copy/pasted) into a textarea. I myself don't know of any use-case where I would need multi-line passwords but at least it would be there...
(Reporter)

Comment 6

10 years ago
Just thought of a user case: You could use this in a userstyle that affects text fields on someone's computer as a prank.

Comment 7

10 years ago
I'm actually struggling to think of a single usecase for multiline passwords on websites since there would be a horrible lack of cross-browser compatibility.  If you're relying on multiline passwords for enhanced security, at the very least you should find a method that doesn't reveal your password on the majority of browsers out there.

As for implementing the usercase in comment #6 without any code changes, you COULD just have text areas use a font consisting entirely of nonsense characters.  Or if you're just trying to prank someone, I do like the classic bucket-over-door thing.
(Reporter)

Comment 8

7 years ago
Apparently WebKit has a similar feature to user-modify:write-only called -webkit-text-security (which is `disc` for input type=password fields, and `none` by default for everything else). A clear use case has come since the introduction of new input types in HTML5. For example, you might want to use user-modify:write-only on an input type=number field for some kind of ID thingy.
You need to log in before you can comment on or make changes to this bug.