Skip to content

Conversation

@vince-fugnitto
Copy link
Member

@vince-fugnitto vince-fugnitto commented May 9, 2022

What it does

Fixes: #11116.

The issue fixes an issue from #10961, where the onclick callback did not pass the check we had causing the callback to never execute the onclick handler.

How to test

You can use the test commit (which will be dropped prior to merge):

  1. execute the StatusBar Test - a statusbar item should be contributed to the statusbar (commit c6dd3f5)
  2. click the StatusBar Test statusbar entry
  3. the onclick should work and display a message

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto [email protected]

@vince-fugnitto vince-fugnitto added the statusbar issues related to the statusbar label May 9, 2022
@vince-fugnitto vince-fugnitto self-assigned this May 9, 2022
Copy link
Contributor

@colin-grant-work colin-grant-work left a comment

Choose a reason for hiding this comment

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

I confirm the bug on master and that this code fixes the problem. Selfishly, I'd request a small change to prevent conflicts with #11083, where I have this code for the same purpose:

        } else if (entry.onclick) {
             attrs.onClick = e => entry.onclick?.(e.nativeEvent);
        }

And of course, the removal of the test commit.

The commit fixes an issue when attempting to perform `onclick` for
statusbar items. Previously, the `onclick` check we had would not pass
and would therefore fail to execute the `onclick` callback.

Signed-off-by: vince-fugnitto <[email protected]>
@vince-fugnitto vince-fugnitto force-pushed the vf/fix-statusbar-items branch from c6dd3f5 to dd87fbf Compare May 11, 2022 15:14
@vince-fugnitto vince-fugnitto merged commit 041e9bd into master May 16, 2022
@vince-fugnitto vince-fugnitto deleted the vf/fix-statusbar-items branch May 16, 2022 12:18
@github-actions github-actions bot added this to the 1.26.0 milestone May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

statusbar issues related to the statusbar

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StatusBar onClick function not called with latest update v1.25.0

3 participants