mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 17:03:07 +09:00
Issue #2790 - Part 5: Persistent highlight despite blur click
This commit is contained in:
parent
bf8cfcc980
commit
156c755085
5 changed files with 64 additions and 16 deletions
|
|
@ -383,11 +383,6 @@ HTMLTextAreaElement::OnValueChanged(bool aNotify, bool aWasInteractiveUserChange
|
|||
{
|
||||
nsAutoString value;
|
||||
GetValueInternal(value, true);
|
||||
// printf("[TextArea] OnValueChanged: aWasInteractiveUserChange=%d, value='%s', autofilled='%s', autofill state=%d\n",
|
||||
// aWasInteractiveUserChange,
|
||||
// NS_ConvertUTF16toUTF8(value).get(),
|
||||
// NS_ConvertUTF16toUTF8(mAutofilledValue).get(),
|
||||
// State().HasState(NS_EVENT_STATE_AUTOFILL));
|
||||
|
||||
// Only remove autofilled state if the value actually changed from autofilled value
|
||||
if (State().HasState(NS_EVENT_STATE_AUTOFILL) || !mAutofilledValue.IsEmpty()) {
|
||||
|
|
@ -395,7 +390,6 @@ HTMLTextAreaElement::OnValueChanged(bool aNotify, bool aWasInteractiveUserChange
|
|||
RemoveStates(NS_EVENT_STATE_AUTOFILL);
|
||||
mAutofilledValue.Truncate();
|
||||
} else if (aWasInteractiveUserChange && mAutofilledValue == value) {
|
||||
// Defensive: re-add the autofill state if it was removed by something else
|
||||
AddStates(NS_EVENT_STATE_AUTOFILL);
|
||||
}
|
||||
}
|
||||
|
|
@ -1248,7 +1242,6 @@ HTMLTextAreaElement::IntrinsicState() const
|
|||
{
|
||||
EventStates state = nsGenericHTMLFormElementWithState::IntrinsicState();
|
||||
|
||||
// PATCH: Persist autofill state if autofilled
|
||||
if (!mAutofilledValue.IsEmpty()) {
|
||||
state |= NS_EVENT_STATE_AUTOFILL;
|
||||
}
|
||||
|
|
@ -1295,8 +1288,6 @@ HTMLTextAreaElement::IntrinsicState() const
|
|||
state |= NS_EVENT_STATE_PLACEHOLDERSHOWN;
|
||||
}
|
||||
|
||||
state |= NS_EVENT_STATE_AUTOFILL;
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue