mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-11-02 03:09:09 +08:00
Some not yet resolved backend problem breaks the usual flow of events after the anchor element navigation happens within the DevTools (e.g., <a href="#anchor" />). One of the issues is that styles events are missing after the DevTools's reloaded. This change reattaches the target before reloading DevTools to mitigate the issue. Fixed: 972001 Change-Id: Ie815a9a7e5dda8d39686068c8064e19bc31285b7 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2157025 Reviewed-by: Peter Marshall <petermarshall@chromium.org> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
15 lines
595 B
JavaScript
15 lines
595 B
JavaScript
// Copyright 2015 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import * as Host from '../host/host.js';
|
|
|
|
import {State} from './DockController.js';
|
|
|
|
export function reload() {
|
|
if (self.Components.dockController.canDock() && self.Components.dockController.dockSide() === State.Undocked) {
|
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.setIsDocked(true, function() {});
|
|
}
|
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.reattach(() => window.location.reload());
|
|
}
|