Bug 1827771 - Clear the revealed state when input type is changed from password. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D175516
This commit is contained in:
@@ -4416,6 +4416,12 @@ void HTMLInputElement::HandleTypeChange(FormControlType aNewType,
|
||||
fm->NeedsFlushBeforeEventHandling(this);
|
||||
}
|
||||
|
||||
if (oldType == FormControlType::InputPassword &&
|
||||
State().HasState(ElementState::REVEALED)) {
|
||||
// Modify the state directly to avoid dispatching events.
|
||||
RemoveStates(ElementState::REVEALED);
|
||||
}
|
||||
|
||||
if (aNewType == FormControlType::InputFile ||
|
||||
oldType == FormControlType::InputFile) {
|
||||
if (aNewType == FormControlType::InputFile) {
|
||||
|
||||
Reference in New Issue
Block a user