Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

New Developer
Posts: 40
Registered: ‎12-14-2013
My Device: Playbook
My Carrier: Orange
Accepted Solution

find text in webview

Hi, I used findText of webview to search text on the page. It works fine if i don't use any webfindflag.


But when i used the flag say WebFindFlag.Backward, it throws error: "ReferenceError: Can't find variable: WebFindFlag"


Container {
            layout: StackLayout {
                orientation: LayoutOrientation.LeftToRight
       TextField {
                    id: find
                    hintText: "Type here .."   

            Button {
                text: "Find"
                onClicked: {
                    if (backward.checked == true)
                        webView.findText(find.text, WebFindFlag.Backward)

         CheckBox {
                id: backward
                text: "Backward"


BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: find text in webview

I'm able to reproduce this in BlackBerry 10.2.1, but confirmed it has been fixed in 10.3.  As a workaround for 10.2.1, you can use the numeric values for WebFindFlag instead, like this:


webView.findText(find.text, 0x01)
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker