diff options
author | Josh Matthews <josh@joshmatthews.net> | 2020-06-12 17:35:58 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2020-06-15 11:22:28 -0400 |
commit | 757371f4f08aca089659fa6774e74bb90b511363 (patch) | |
tree | 3d1326104bec462410c93d08fff1e76eda796435 /components/script/dom/htmltextareaelement.rs | |
parent | a34d1573b6d79211f0efeafcc3ae4b505280cb54 (diff) | |
download | servo-757371f4f08aca089659fa6774e74bb90b511363.tar.gz servo-757371f4f08aca089659fa6774e74bb90b511363.zip |
Make clicking on an element request focus for focusable elements.
Diffstat (limited to 'components/script/dom/htmltextareaelement.rs')
-rwxr-xr-x | components/script/dom/htmltextareaelement.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/components/script/dom/htmltextareaelement.rs b/components/script/dom/htmltextareaelement.rs index b7d224db123..cbdbcec2f0f 100755 --- a/components/script/dom/htmltextareaelement.rs +++ b/components/script/dom/htmltextareaelement.rs @@ -23,7 +23,7 @@ use crate::dom::htmlfieldsetelement::HTMLFieldSetElement; use crate::dom::htmlformelement::{FormControl, HTMLFormElement}; use crate::dom::htmlinputelement::HTMLInputElement; use crate::dom::keyboardevent::KeyboardEvent; -use crate::dom::node::{document_from_node, window_from_node}; +use crate::dom::node::window_from_node; use crate::dom::node::{ BindContext, ChildrenMutation, CloneChildrenFlag, Node, NodeDamage, UnbindContext, }; @@ -606,8 +606,6 @@ impl VirtualMethods for HTMLTextAreaElement { if event.type_() == atom!("click") && !event.DefaultPrevented() { //TODO: set the editing position for text inputs - - document_from_node(self).request_focus(self.upcast()); } else if event.type_() == atom!("keydown") && !event.DefaultPrevented() { if let Some(kevent) = event.downcast::<KeyboardEvent>() { // This can't be inlined, as holding on to textinput.borrow_mut() |