Skip to content

Conversation

@Parasaran-Python
Copy link
Contributor

@Parasaran-Python Parasaran-Python commented Jun 30, 2024

Fixes #218254

onDidShowContextMenu fires for every webview even though only one webview has the context menu visible, hence removed the onDidShow listener, sending the set-context-menu-visible event to the html on did-context-menu event so that the context-menu-visible class gets applied only to the webview that actually has the context menu visible

@Parasaran-Python
Copy link
Contributor Author

Parasaran-Python commented Jun 30, 2024

@mjbvz could you please check and review this change 🙂. I'm a bit new to this code repo and would appreciate your feedback.

@Parasaran-Python Parasaran-Python changed the title Fixing 218254 fixes 218254 Jun 30, 2024
@Parasaran-Python Parasaran-Python changed the title fixes 218254 fixes #218254 Jun 30, 2024
@Parasaran-Python Parasaran-Python changed the title fixes #218254 (Fixes #218254) Jun 30, 2024
@Parasaran-Python
Copy link
Contributor Author

Parasaran-Python commented Jun 30, 2024

Fixes #218254

@Parasaran-Python
Copy link
Contributor Author

@mjbvz could you please take a look at this when you have a moment 🙂? Thank you! 🙂

@Parasaran-Python Parasaran-Python force-pushed the 218254 branch 3 times, most recently from fc3f18b to 85d6dc3 Compare July 8, 2024 14:49

this._messagePort = e.ports[0];
this._messagePort.onmessage = (e) => {
if (e.data.channel === 'did-context-menu') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use the existing did-context-menu listener on line 246 for this

Copy link
Contributor Author

@Parasaran-Python Parasaran-Python Jul 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure will check and update @mjbvz

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done @mjbvz 🙂

@Parasaran-Python Parasaran-Python force-pushed the 218254 branch 2 times, most recently from d0ae5a2 to 155513e Compare July 8, 2024 17:46
onDidShowContextMenu fires for every webview even though only one webview has the context menu visible, hence removed the onDidShow listener, sending the set-context-menu-visible event to the html on did-context-menu event so that the context-menu-visible class gets applied only to the webview that actually has the context menu visible
Copy link
Collaborator

@mjbvz mjbvz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mjbvz mjbvz enabled auto-merge (squash) July 8, 2024 18:08
@vscodenpa vscodenpa added this to the July 2024 milestone Jul 8, 2024
@mjbvz mjbvz merged commit 9e4f826 into microsoft:main Jul 8, 2024
aaronchucarroll pushed a commit to aaronchucarroll/vscode that referenced this pull request Jul 10, 2024
onDidShowContextMenu fires for every webview even though only one webview has the context menu visible, hence removed the onDidShow listener, sending the set-context-menu-visible event to the html on did-context-menu event so that the context-menu-visible class gets applied only to the webview that actually has the context menu visible
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Aug 22, 2024
@Parasaran-Python Parasaran-Python deleted the 218254 branch September 29, 2024 06:59
@Parasaran-Python Parasaran-Python restored the 218254 branch September 29, 2024 06:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copying a PNG image from VSCode results in a different image.

5 participants