Way to get text present in input field for all editable node

8 views
Skip to first unread message

Ankit

unread,
Apr 14, 2015, 3:11:58 AM4/14/15
to chromi...@chromium.org
Hi,
I want to check if there is some text present in the input field or not.

Problem I am facing is this:
For some input field like Gmail new message body/Dev tools isHTMLTextFormControlElement(r.innerNonSharedNode()) fails 
but r.isContentEditable() passes where "r" is HitTestResult.

In case isHTMLTextFormControlElement(r.innerNonSharedNode()) passes I am able to get text present in focused node by below code:
toHTMLTextFormControlElement(r.innerNonSharedNode())->value()

But in case  isHTMLTextFormControlElement(r.innerNonSharedNode()) fails and r.isContentEditable() passes I have no way to get text 
present in focused node.

Is there any way I can check for text present in input field for all types of editable node?
Or is it possible to get text present in input field even if isHTMLTextFormControlElement(r.innerNonSharedNode()) is failing 
through HitTestResult??
Reply all
Reply to author
Forward
0 new messages