question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SplitButton doesn't behave as split button using touch

See original GitHub issue

Describe the bug

SplitButton doesn’t behave as split button using touch.

Steps to reproduce the bug

  1. Create a split button with a default command and drop down (e.g. with content ‘Play’)
  2. Try clicking the “button” part with the mouse => works
  3. Try tapping the “button” part with touch => shows dropdown

Expected behavior

Since a default command is bound to the button, I don’t want to repeat myself inside the dropdown for touch (otherwise I would have used the DropDownButton). I would expect the SplitButton to be invoking the command when tapping the button part.

Screenshots

Using mouse:

image

Using touch:

image

Version Info

All windows versions (Windows 10 Mobile, and the 1809 update on a surface tablet)

NuGet package version:

<PackageReference Include="Microsoft.UI.Xaml">
  <Version>2.0.181018003.1</Version>
</PackageReference>

Windows 10 version:

  • Insider Build (xxxxx)
  • October 2018 Update (17763)
  • April 2018 Update (17134)
  • Fall Creators Update (16299)
  • Creators Update (15063)
  • Anniversary Update (14393)

Device form factor:

  • Desktop
  • Mobile
  • Xbox
  • Surface Hub
  • IoT

Additional context

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:3
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

5reactions
GeertvanHorrikcommented, Jan 15, 2019

If it’s not working correctly as a button then that would be a bug. Please let us know how it’s misbehaving specifically.

Whenever you implement a command on the button itself (SplitButton.Command), then that will never be invokable. So you must repeat yourself in the flyout in order to actually allow the (most important) command to be executable.

I think it’s a UX design issue, that can be considered a bug in the apps using this button of the devs are not aware of this.

1reaction
GeertvanHorrikcommented, Jan 14, 2019

Then shouldn’t it be mentioned in the remarks of the docs? And I think it’s still a design issue, because in this case it’s not a split button at all (and I need to repeat myself in order to get the regular button behavior, it’s actually not working as intended on touch devices).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Split Buttons: Definition
A split button is a hybrid between a button and a menu: it groups related commands together into a dropdown, but also offers...
Read more >
Split BUtton is not Working
I am using this example on my application. https://codepen.io/kushalpandya/pen/IAhin/ Button is appearing perfectly on the screen. I place div ...
Read more >
SplitButton Class (Windows.UI.Xaml.Controls) - UWP
Represents a button with two parts that can be invoked separately. One part behaves like a standard button and the other part invokes...
Read more >
Buttons - Windows apps
When invoked with touch, the split button behaves as a drop down button; both halves of the button invoke the flyout. With other...
Read more >
Kendo-split-button close the drop down dynamicallyically
In the SplitButton, when an item from the drop-down list is selected, the drop-down closes. Here is an example, showing this default behavior:....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found