| Code-Review | +1 |
createTabSuggestion({tabId: 1, title: 'Tab 1'}),put in several new lines
if (flyout && e.target instanceof Node &&add comment what this if staement means if possible
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
put in several new lines
Done
add comment what this if staement means if possible
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
6 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: ui/webui/resources/cr_components/composebox/contextual_action_menu.ts
Insertions: 2, Deletions: 0.
@@ -196,6 +196,8 @@
}
const flyout =
this.shadowRoot?.querySelector<HTMLElement>('.share-tabs-flyout');
+ // Ignore scroll events originating from within the flyout's own content
+ // (e.g. scrolling a long list of tab suggestions).
if (flyout && e.target instanceof Node &&
(e.target === flyout || flyout.contains(e.target))) {
return;
```
```
The name of the file: chrome/test/data/webui/cr_components/composebox/contextual_action_menu_test.ts
Insertions: 4, Deletions: 0.
@@ -873,11 +873,15 @@
loadTimeData.overrideValues({
contextManagementInComposeboxEnabled: true,
});
+
actionMenu.remove();
actionMenu = document.createElement('cr-composebox-contextual-action-menu');
actionMenu.tabSuggestions = [
createTabSuggestion({tabId: 1, title: 'Tab 1'}),
+ createTabSuggestion({tabId: 2, title: 'Tab 2'}),
+ createTabSuggestion({tabId: 3, title: 'Tab 3'}),
];
+
actionMenu.inputState = new MockInputState({
allowedInputTypes: [InputType.kBrowserTab],
});
```
[Context-Input] Fix flyout menu positioning on scroll
The share tabs flyout uses `position: fixed` to escape overflow clipping
by its parent `<cr-action-menu>`. Consequently, when the page or parent
dialog scrolls, the flyout remained anchored relative to the viewport
instead of following the Plus menu trigger. This CL attaches a
capture-mode `scroll` listener to `window` whenever the flyout is open
to recalculate the trigger rect and update the flyout coordinates
dynamically.
Before fix:
https://screencast.googleplex.com/cast/NjAwMzEzMjQyMDA2MzIzMnxmMWIxM2VlYS02OQ
After fix:
https://screencast.googleplex.com/cast/NTkyMTY2MjQ2MDQ5MzgyNHxhYzYyMmI3YS1jZg
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |