Closed
Bug 1568753
Opened 5 years ago
Closed 5 years ago
nsIEditor.mask() can throw NS_ERROR_ILLEGAL_VALUE on empty fields when autoMaskingEnabled=false
Categories
(Core :: DOM: Editor, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla70
Tracking | Status | |
---|---|---|
firefox69 | --- | unaffected |
firefox70 | --- | fixed |
People
(Reporter: MattN, Assigned: masayuki)
References
Details
(Whiteboard: [passwords:generation] [skyline])
Attachments
(1 file)
I may have found a bug with the new password masking APIs but I'm not sure if an empty field is supposed to behave in a special way:
STR:
- Have an empty type=password field
field.editor.autoMaskingEnabled
=>true
field.editor.unmask(0)
field.editor.autoMaskingEnabled
=>false
field.editor.mask()
Expected result:
- Field should be masked again for future input
field.editor.autoMaskingEnabled
should betrue
Actual result:
- Field is masked for future input
NS_ERROR_ILLEGAL_VALUE
thrown from nsIEditor.maskfield.editor.autoMaskingEnabled
istrue
(changed from false to true despite the error)
Flags: needinfo?(masayuki)
Assignee | ||
Updated•5 years ago
|
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Flags: needinfo?(masayuki)
Updated•5 years ago
|
Priority: -- → P1
Assignee | ||
Comment 1•5 years ago
|
||
aStart
of TextEditor::SetUnmaskRangeInternal()
may be UINT32_MAX
if
it's called for stopping unmasking. However, it returns NS_ERROR_INVALID_ARG
if there is no text node and aStart
is not 0, but this is unexpected behavior.
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/a54fcf822e11 Make `TextEditor::SetUnmaskRangeInternal()` return NS_OK if there is no text node and `aStart` is `UINT32_MAX` r=m_kato
Comment 3•5 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in
before you can comment on or make changes to this bug.
Description
•