mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Make text input relayout when value is changed directly
This commit is contained in:
parent
918d64e6fc
commit
0db6f857ad
1 changed files with 2 additions and 0 deletions
|
@ -259,6 +259,7 @@ impl<'a> HTMLInputElementMethods for JSRef<'a, HTMLInputElement> {
|
|||
fn SetValue(self, value: DOMString) {
|
||||
self.textinput.borrow_mut().set_content(value);
|
||||
self.value_changed.set(true);
|
||||
self.force_relayout();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#dom-input-defaultvalue
|
||||
|
@ -427,6 +428,7 @@ impl<'a> HTMLInputElementHelpers for JSRef<'a, HTMLInputElement> {
|
|||
|
||||
self.SetValue(self.DefaultValue());
|
||||
self.value_changed.set(false);
|
||||
self.force_relayout();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue