Skip to content

[Problem/Bug]: WebView2 v152+ enforces CSS inheritance on app-region: drag, causing unintended drag regions #5696

Open

Description

@OmerMor

What happened?

Summary

We recently spent some time debugging a severe regression in our application after the Evergreen WebView2 Runtime updated to version 152.0.4191.x. We are sharing our findings here to help other developers who might run into the same issue.

If your application uses borderless windows with custom drag regions (app-region: drag / -webkit-app-region: drag), you may find that tooltips, dropdowns, or overlay buttons suddenly act as drag handles and swallow mouse clicks.

Root Cause

WebView2 v152 pulled in upstream Chromium commit 9100cdc8 (implementing CSSWG issue 13101), which enforces explicit CSS inheritance for the window-drag / app-region properties.

Previously, if you had a parent container with app-region: drag, an overflowed child element (like a floating tooltip) did not inherit the drag behavior. In v152+, overflowed children now automatically inherit app-region: drag. If you rely on native Win32 hit-testing (e.g., GetNonClientRegionAtPoint), the OS will treat these elements as HTCAPTION, turning standard clicks into window drag events.

The Workaround / Fix

To fix this, you must explicitly declare app-region: no-drag; (and -webkit-app-region: no-drag;) on any interactive overlays, tooltips, or modals that sit on top of a draggable surface.

Recommendation for the WebView2 Team

Since this is an intentional standards-alignment change from Chromium, we are not expecting a code fix. However, because this is a silent breaking change for desktop applications utilizing GetNonClientRegionAtPoint, we recommend adding a note about this behavioral shift to the WebView2 release notes or documentation for v152 to save other developers from having to bisect this regression.

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

152.0.4191.53

SDK Version

No response

Framework

Win32

Operating System

Windows 11

OS Version

No response

Repro steps

  1. Create a borderless/frameless WebView2 window that relies on GetNonClientRegionAtPoint (or IsNonClientRegionSupportEnabled) to handle window dragging.
  2. Load an HTML document containing a parent element configured as a drag region, and a child interactive element (like a button) that overflows or sits within it, without explicitly disabling the drag region.

Minimal HTML/CSS Example:

<style>
  .main-container {
    -webkit-app-region: drag; /* Parent is draggable */
    height: 100vh;
    background: #f0f0f0;
  }
  .tooltip-button {
    /* Missing -webkit-app-region: no-drag; */
    position: absolute;
    top: -20px; /* Overflowing the standard flow */
    cursor: pointer;
  }
</style>

<div class="main-container">
  <button class="tooltip-button" onclick="alert('Clicked!')">
    Click Me
  </button>
</div>
  1. Attempt to left-click the "Click Me" button.

Expected Behavior:
The button registers the click event (triggering the alert) and behaves as a standard interactive web element. (This was the behavior in WebView2 v151 and earlier, as the overflowed child did not inherit the drag property).

Actual Behavior:
The click event is swallowed by the OS. GetNonClientRegionAtPoint reports the button as a drag region (HTCAPTION), and holding the mouse down initiates a window drag/move action instead of clicking the button.

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Regression in newer Runtime

Last working version (if regression)

Runtime 151.0.4129.50

Activity

  1. xystar2012 commented on Sep 9, 2026

    @xystar2012
    Image

    Even on simple pages that don't have any app-region attribute, the mouse stops responding. This issue is very serious. Should we issue an emergency fix and revert this merge?
    Steps to reproduce:
    #5695

  2. chetanpandey1266 commented on Sep 11, 2026

    @chetanpandey1266
    Contributor

    xystar2012 the repro step you gave didn't worked for us. We are able to repro it with the app-region change and are able to mitigate it by the steps shared by Omer. Can you give us a minimal repro app for the scenario you are facing.

  3. xystar2012 commented on Sep 11, 2026

    @xystar2012
    Image webviewsample create webview from menu window-> visual - Dcomp
  4. xystar2012 commented on Sep 11, 2026

    @xystar2012

    input this text to console:
    document.documentElement.innerHTML = `

    <title>Test Page</title> 这是一段简单的测试文本。 `; Chetan Pandey (@chetanpandey1266)
  5. xystar2012 commented on Sep 11, 2026

    @xystar2012
    Image this is window tree using webview2 composition api
  6. zprettytext commented on Sep 14, 2026

    @zprettytext

    I was able to reproduce the same issue using the official WebView2APISample from Microsoft.

    The issue is reproducible in Composition Mode. I did not make any changes to the WebView2 host implementation. I only replaced the page content with the following simple HTML:

    document.documentElement.innerHTML = `
      <head>
        <meta charset="UTF-8">
        <title>Test Page</title>
      </head>
      <body style="margin: 0; height: 100vh; display: flex; justify-content: center; align-items: center; font-family: sans-serif; font-size: 24px;">
        这是一段简单的测试文本。
      </body>
    `;

    Environment

    • WebView2 SDK build: 4255.0
    • Runtime version: 153.0.4234.32
    • App path: C:\tools\WebView2Samples\SampleApps\WebView2APISample\Debug\x64
    • Runtime path: C:\Program Files (x86)\Microsoft\EdgeWebView\Application\153.0.4234.32
    • User data folder: C:\tools\WebView2Samples\SampleApps\WebView2APISample\Debug\x64\WebView2APISample.exe.WebView2
    • User data folder type: Non-shared

    This confirms that the issue can be reproduced with the Microsoft-provided WebView2APISample in Composition Mode, independent of our application's WebView2 integration.
    Omer Mor (@OmerMor) Ambika Kunnath (@ambikakunnath) Chetan Pandey (@chetanpandey1266)

  7. laiyierjiangsu commented on Sep 15, 2026

    @laiyierjiangsu

    My product has also been affected by this issue, and it is quite severe — it has resulted in a significantly degraded user experience. I believe the WebView2 team should take ownership of this problem and fix it, rather than attributing it to the underlying Chromium kernel. We are users of the WebView2 component, not of the Chromium kernel itself, so we rely on the WebView2 team to resolve issues that surface through this component. I would greatly appreciate it if you could escalate this issue to the WebView2 team and help ensure it receives proper attention. This is a serious problem that deserves prompt action.

    Omer Mor (@OmerMor) Ambika Kunnath (@ambikakunnath) xystar2012 Chetan Pandey (@chetanpandey1266)

  8. laiyierjiangsu commented on Sep 15, 2026

    @laiyierjiangsu

    Chetan Pandey (@chetanpandey1266) Omer Mor (@OmerMor)

    Additional Request:

    Please provide a native API for detecting when a Composition-hosted WebView stops processing mouse input.

    In this state, the host continues to receive WM_MOUSEMOVE and mouse button messages, and SendMouseInput returns S_OK, yet the WebView content no longer responds to mouse or keyboard input. ProcessFailed is not raised because the renderer process is still alive and is not reported as unresponsive.

    Without executing JavaScript or relying on page-side events, the host has no way to determine whether the input was actually processed by the WebView, nor can it safely decide when to recreate the WebView.

    A native input-processing health event, an input acknowledgment mechanism, or a CompositionController responsiveness query would allow applications to detect this condition and recover by recreating the WebView.

  9. wangqiang1588 commented on Sep 16, 2026

    @wangqiang1588

    same as #5715

  10. 1 remaining item

  11. drysart commented on Sep 16, 2026

    @drysart

    Getting reports from users of my application that it's becoming unresponsive to mouse and keyboard (but otherwise the application is continuing to operate and DOM updates are displayed). My application does make use of app-region: drag but not in a way where CSS inheritance or element airspace overlap would come into play, so this may not only be an issue relating to CSS inheritance.

  12. laiyierjiangsu commented on Sep 17, 2026

    @laiyierjiangsu

    Getting reports from users of my application that it's becoming unresponsive to mouse and keyboard (but otherwise the application is continuing to operate and DOM updates are displayed). My application does make use of app-region: drag but not in a way where CSS inheritance or element airspace overlap would come into play, so this may not only be an issue relating to CSS inheritance.

    Yes, CSS inheritance isn't the root cause.

  13. wangqiang1588 commented on Sep 18, 2026

    @wangqiang1588

    How to fix it ?

  14. wangqiang1588 commented on Sep 20, 2026

    @wangqiang1588

    why?

    Running a message loop synchronously in an event handler in Webview can cause reentrancy issue. Please refer to https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/threading-model#re-entrancy for more information about threading model in WebView2 and how to enable native code debugging for this scenario.
    
    
    Image

    callstack:

     	EmbeddedBrowserWebView.dll!base::debug::BreakDebuggerAsyncSafe(void)	未知
     	EmbeddedBrowserWebView.dll!embedded_browser_webview::internal::AppTaskRunner::MessageCallback()	未知
     	EmbeddedBrowserWebView.dll!base::internal::Invoker<base::internal::FunctorTraits<bool (embedded_browser_webview::internal::AppTaskRunner::*const &)(unsigned int, unsigned int, long, long *) __attribute__((thiscall)),embedded_browser_webview::internal::AppTaskRunner *>,base::internal::BindState<1,1,0,bool (embedded_browser_webview::internal::AppTaskRunner::*)(unsigned int, unsigned int, long, long *) __attribute__((thiscall)),base::internal::UnretainedWrapper<embedded_browser_webview::internal::AppTaskRunner,base::unretained_traits::MayNotDangle,0>>,bool (unsigned int, unsigned int, long, long *)>::Run()	未知
     	EmbeddedBrowserWebView.dll!base::win::MessageWindow::WindowProc()	未知
     	EmbeddedBrowserWebView.dll!base::win::WrappedWindowProc<&base::win::MessageWindow::WindowProc>()	未知
     	user32.dll!__InternalCallWinProc@20()	未知
     	user32.dll!UserCallWinProcCheckWow(struct _ACTIVATION_CONTEXT *,void *,struct HWND__ *,enum _WM_VALUE,unsigned int,long,void *,int)	未知
     	user32.dll!_DispatchMessageWorker@8()	未知
     	user32.dll!_DispatchMessageW@4()	未知
     	ole32.dll!CDragOperation::HandleMessages() 行 2734	C++
    	ole32.dll!DoDragDrop(IDataObject * pDataObject, IDropSource * pDropSource, unsigned long dwOKEffects, unsigned long * pdwEffect) 行 3349	C++
     	EmbeddedBrowserWebView.dll!base::internal::Invoker<base::internal::FunctorTraits<const `lambda at ..\..\edge_embedded_browser\client\win\current\embedded_browser_webview_impl.cc:336:41' &>,base::internal::BindState<0,0,0,`lambda at ..\..\edge_embedded_browser\client\win\current\embedded_browser_webview_impl.cc:336:41'>,long (IDataObject *, IDropSource *, unsigned long, unsigned long *)>::Run()	未知
     	EmbeddedBrowserWebView.dll!base::RepeatingCallback<long (IDataObject *, IDropSource *, unsigned long, unsigned long *)>::Run()	未知
     	EmbeddedBrowserWebView.dll!embedded_browser_webview_current::EmbeddedBrowserWebView::ContinueDragDrop()	未知
     	EmbeddedBrowserWebView.dll!base::internal::Invoker<base::internal::FunctorTraits<void (embedded_browser_webview_current::EmbeddedBrowserWebView::*&&)(base::OnceCallback<void (unsigned int)>, unsigned int, IDataObject *, bool) __attribute__((thiscall)),base::WeakPtr<embedded_browser_webview_current::EmbeddedBrowserWebView> &&,base::OnceCallback<void (unsigned int)> &&,unsigned int &&>,base::internal::BindState<1,1,0,void (embedded_browser_webview_current::EmbeddedBrowserWebView::*)(base::OnceCallback<void (unsigned int)>, unsigned int, IDataObject *, bool) __attribute__((thiscall)),base::WeakPtr<embedded_browser_webview_current::EmbeddedBrowserWebView>,base::OnceCallback<void (unsigned int)>,unsigned int>,void (IDataObject *, bool)>::RunOnce()	未知
     	EmbeddedBrowserWebView.dll!base::OnceCallback<void (class base::FilePath const &,bool)>::Run(class base::FilePath const &,bool)	未知
     	EmbeddedBrowserWebView.dll!embedded_browser_webview_current::internal::DragStartingEventArgs::InvokeCompleteHandler(void)	未知
     	EmbeddedBrowserWebView.dll!embedded_browser_webview_current::internal::DeferrableEventArgs<embedded_browser_webview_current::internal::DragStartingEventArgs,ICoreWebView2DragStartingEventArgs>::InvokeFinished()	未知
     	EmbeddedBrowserWebView.dll!embedded_browser_webview_current::EmbeddedBrowserWebView::StartDragAndDrop(class std::__Cr::vector<unsigned char,class std::__Cr::allocator<unsigned char> > const &,unsigned int,class gfx::Point const &,class base::OnceCallback<void (unsigned int)>)	未知
     	EmbeddedBrowserWebView.dll!embedded_browser::mojom::EmbeddedBrowserClientStubDispatch::AcceptWithResponder(class embedded_browser::mojom::EmbeddedBrowserClient *,class mojo::Message *,class std::__Cr::unique_ptr<class mojo::MessageReceiverWithStatus,struct std::__Cr::default_delete<class mojo::MessageReceiverWithStatus> >)	未知
     	EmbeddedBrowserWebView.dll!embedded_browser::mojom::EmbeddedBrowserClientStub<struct mojo::RawPtrImplRefTraits<class embedded_browser::mojom::EmbeddedBrowserClient> >::AcceptWithResponder(class mojo::Message *,class std::__Cr::unique_ptr<class mojo::MessageReceiverWithStatus,struct std::__Cr::default_delete<class mojo::MessageReceiverWithStatus> >)	未知
     	EmbeddedBrowserWebView.dll!mojo::InterfaceEndpointClient::HandleValidatedMessage()	未知
     	EmbeddedBrowserWebView.dll!mojo::MessageDispatcher::Accept(class mojo::Message *)	未知
     	EmbeddedBrowserWebView.dll!mojo::InterfaceEndpointClient::HandleIncomingMessage(class mojo::Message *)	未知
     	EmbeddedBrowserWebView.dll!mojo::internal::MultiplexRouter::ProcessIncomingMessage()	未知
     	EmbeddedBrowserWebView.dll!mojo::internal::MultiplexRouter::Accept(class mojo::Message *)	未知
     	EmbeddedBrowserWebView.dll!mojo::MessageDispatcher::Accept(class mojo::Message *)	未知
     	EmbeddedBrowserWebView.dll!mojo::Connector::DispatchMessageW()	未知
     	EmbeddedBrowserWebView.dll!mojo::Connector::ReadAllAvailableMessages()	未知
     	EmbeddedBrowserWebView.dll!mojo::Connector::OnHandleReadyInternal()	未知
     	EmbeddedBrowserWebView.dll!mojo::Connector::OnWatcherHandleReady()	未知
     	EmbeddedBrowserWebView.dll!base::internal::Invoker<base::internal::FunctorTraits<void (mojo::Connector::*const &)(const char *, unsigned int) __attribute__((thiscall)),mojo::Connector *,const char *const &>,base::internal::BindState<1,1,0,void (mojo::Connector::*)(const char *, unsigned int) __attribute__((thiscall)),base::internal::UnretainedWrapper<mojo::Connector,base::unretained_traits::MayNotDangle,0>,base::internal::UnretainedWrapper<const char,base::unretained_traits::MayNotDangle,0>>,void (unsigned int)>::Run()	未知
     	EmbeddedBrowserWebView.dll!base::RepeatingCallback<void (const gfx::PointF &)>::Run()	未知
     	EmbeddedBrowserWebView.dll!mojo::SimpleWatcher::DiscardReadyState()	未知
     	EmbeddedBrowserWebView.dll!base::internal::Invoker<base::internal::FunctorTraits<void (*const &)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &),const base::RepeatingCallback<void (unsigned int)> &>,base::internal::BindState<0,1,0,void (*)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &),base::RepeatingCallback<void (unsigned int)>>,void (unsigned int, const mojo::HandleSignalsState &)>::Run()	未知
     	EmbeddedBrowserWebView.dll!base::RepeatingCallback<void (IUnknown *, embedded_browser_webview::internal::ResourceState)>::Run()	未知
     	EmbeddedBrowserWebView.dll!mojo::SimpleWatcher::OnHandleReady()	未知
     	EmbeddedBrowserWebView.dll!base::internal::Invoker<base::internal::FunctorTraits<void (mojo::SimpleWatcher::*&&)(int, unsigned int, const mojo::HandleSignalsState &) __attribute__((thiscall)),base::WeakPtr<mojo::SimpleWatcher> &&,int &&,unsigned int &&,mojo::HandleSignalsState &&>,base::internal::BindState<1,1,0,void (mojo::SimpleWatcher::*)(int, unsigned int, const mojo::HandleSignalsState &) __attribute__((thiscall)),base::WeakPtr<mojo::SimpleWatcher>,int,unsigned int,mojo::HandleSignalsState>,void ()>::RunOnce()	未知
     	EmbeddedBrowserWebView.dll!base::TaskAnnotator::RunTaskImpl(struct base::PendingTask &)	未知
     	EmbeddedBrowserWebView.dll!base::TaskAnnotator::RunTask<>()	未知
     	EmbeddedBrowserWebView.dll!embedded_browser_webview::internal::AppTaskRunner::DoWork(void)	未知
     	EmbeddedBrowserWebView.dll!embedded_browser_webview::internal::AppTaskRunner::MessageCallback()	未知
     	EmbeddedBrowserWebView.dll!base::internal::Invoker<base::internal::FunctorTraits<bool (embedded_browser_webview::internal::AppTaskRunner::*const &)(unsigned int, unsigned int, long, long *) __attribute__((thiscall)),embedded_browser_webview::internal::AppTaskRunner *>,base::internal::BindState<1,1,0,bool (embedded_browser_webview::internal::AppTaskRunner::*)(unsigned int, unsigned int, long, long *) __attribute__((thiscall)),base::internal::UnretainedWrapper<embedded_browser_webview::internal::AppTaskRunner,base::unretained_traits::MayNotDangle,0>>,bool (unsigned int, unsigned int, long, long *)>::Run()	未知
     	EmbeddedBrowserWebView.dll!base::win::MessageWindow::WindowProc()	未知
     	EmbeddedBrowserWebView.dll!base::win::WrappedWindowProc<&base::win::MessageWindow::WindowProc>()	未知
     	user32.dll!__InternalCallWinProc@20()	未知
     	user32.dll!UserCallWinProcCheckWow(struct _ACTIVATION_CONTEXT *,void *,struct HWND__ *,enum _WM_VALUE,unsigned int,long,void *,int)	未知
     	user32.dll!_DispatchMessageWorker@8()	未知
     	user32.dll!_IsDialogMessageW@8()	未知
     	WebView2APISample.exe!RunMessagePump() 行 232	C++
     	WebView2APISample.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) 行 207	C++
     	WebView2APISample.exe!invoke_main() 行 123	C++
     	WebView2APISample.exe!__scrt_common_main_seh() 行 288	C++
     	WebView2APISample.exe!__scrt_common_main() 行 331	C++
     	WebView2APISample.exe!wWinMainCRTStartup(void * __formal) 行 17	C++
     	kernel32.dll!@BaseThreadInitThunk@12()	未知
     	ntdll.dll!___RtlUserThreadStart@8()	未知
     	ntdll.dll!__RtlUserThreadStart@8()	未知
    
  15. mgalla10 commented on Sep 24, 2026

    @mgalla10

    Our application has been impacted by this as well. Are there any updates on this? Is this something that we can expect might be addressed in future WebView2 runtime updates?

  16. laiyierjiangsu commented on Oct 12, 2026

    @laiyierjiangsu

    Chetan Pandey (@chetanpandey1266) Is there any update about this issue?

    In my option, [Bug]: Visual-DComp WebView stops responding while SendMouseInput continues to succeed
    #5712 this bug is another problem, and has no relation with CSS inheritance on app-region . Please check .

  17. chetanpandey1266 commented on Oct 22, 2026

    @chetanpandey1266
    Contributor

    KHacker (@laiyierjiangsu) navneetrathi-msft is looking at the issue. He will update you by next week.

  18. laiyierjiangsu commented on Oct 26, 2026

    @laiyierjiangsu

    navneetrathi-msft I reproduced this problem in the latest version 155.0.4283.62. This regression has a serious impact on the customer experience of our product. Could you give me some update asap?

  19. laiyierjiangsu commented on Oct 30, 2026

    @laiyierjiangsu

    navneetrathi-msft Is there any update?

  20. navneetrathi-msft commented on Oct 30, 2026

    @navneetrathi-msft

    Hello,
    we will provide an update soon.
    Working on this.
    Thanks.

  21. laiyierjiangsu commented on Oct 31, 2026

    @laiyierjiangsu

    navneetrathi-msft Thank you for your hard work . If you know which version will be updated to fix this problem , could you let me know ? I want to check it asap.

  22. navneetrathi-msft commented on Nov 3, 2026

    @navneetrathi-msft

    Hello,
    I checked, this is probably not the correct issue to track this as this was raised for a different reason, this github issue deals with css-inheritence for app-region drag and the issue bveing discussed here is different and relates more to this - #5712 (comment)
    KHacker (@laiyierjiangsu) I will be closing this one and we can follow up on #5712 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workingregressionSomething used to work but doesn't anymore

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions