WebView.MoveFocus
-----------------

Moves the focus.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WebView](component_WebView.md) | [16.2](newinversion162.md) | ❌ No | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "WebView.MoveFocus"; WebViewerRef; Reason ) 

**MBS**( **"WebView.MoveFocus";** /\* Moves the focus. \*/  
**$WebViewerRef**; /\* Either the Web Viewer Object Name or the Web Viewer ID as returned by "[WebView.FindByName](WebViewFindByName.md)" function. \*/   
**$Reason**) /\* The reason to move focus.  
Pass Programmatic, Next or Previous.e.g. "Programmatic" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| WebViewerRef | Either the Web Viewer Object Name or the Web Viewer ID as returned by "[WebView.FindByName](WebViewFindByName.md)" function. |  |
| Reason | The reason to move focus.   Pass Programmatic, Next or Previous. | "Programmatic" |

### Result

Returns OK or error.

### Description

Moves the focus.  
WebView will get focus and focus will be set to correspondent element in the page hosted in the WebView. For Programmatic reason, focus is set to previously focused element or the default element if no previously focused element exists. For Next reason, focus is set to the first element. For Previous reason, focus is set to the last element. WebView changes focus through user interaction including selecting into a WebView or Tab into it. For tabbing, the app runs MoveFocus with Next or Previous to align with Tab and Shift+Tab respectively when it decides the WebView is the next tabable element.  
  
| Text | Value | Description |
|---|---|---|
| Programmatic | 0 | Specifies that the code is setting focus into WebView. |
| Next | 1 | Specifies that the focus is moving due to Tab traversal forward. |
| Previous | 2 | Specifies that the focus is moving due to Tab traversal backward. |

  
  
### See also

- [WebView.FindByName](WebViewFindByName.md)
- [WebView.SetFocus](WebViewSetFocus.md)

### Release notes

- **Version 16.2**
    - Added [WebView.MoveFocus](https://www.mbsplugins.eu/WebViewMoveFocus.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin 16.2 News](https://www.mbsplugins.de/archive/2026-05-20/MBS_FileMaker_Plugin_162_News/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 16.2pr1](https://www.mbsplugins.de/archive/2026-04-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th March 2026 , last changed 18th March 2026

  
[WebView.MakeTextStandardSize](WebViewMakeTextStandardSize.md) - [WebView.Passwords.Clear](WebViewPasswordsClear.md)

[HTML Version](WebViewMoveFocus.shtml)