Introduce <LayoutDom<Element>>::focus_state

This commit is contained in:
Anthony Ramine 2020-04-01 11:30:21 +02:00
parent 295f120425
commit 28e5abe606
3 changed files with 14 additions and 2 deletions

View file

@ -96,7 +96,7 @@ impl LayoutHTMLTextAreaElementHelpers for LayoutDom<'_, HTMLTextAreaElement> {
#[allow(unsafe_code)]
unsafe fn selection_for_layout(self) -> Option<Range<usize>> {
if !(*self.unsafe_get()).upcast::<Element>().focus_state() {
if !self.upcast::<Element>().focus_state() {
return None;
}
let textinput = (*self.unsafe_get()).textinput.borrow_for_layout();