Bug 52464 - SearchCommand with CanExecute = false disables input on SearchBar
Summary: SearchCommand with CanExecute = false disables input on SearchBar
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.3
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Paul DiPietro [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-02-13 06:33 UTC by Kent
Modified: 2017-06-21 13:46 UTC (History)
4 users (show)

Tags: canexecute ui command ac
Is this bug a regression?: ---
Last known good build:


Attachments
Repro (296.98 KB, application/x-zip-compressed)
2017-02-13 06:33 UTC, Kent
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 52464 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Kent 2017-02-13 06:33:10 UTC
Created attachment 19796 [details]
Repro

Per the attached repro, a SearchCommand that returns false for CanExecute disables the text input on the search bar. This means that if you want a command that can only execute when text is entered, the bar disables when there is no text, hence preventing the user from actually entering text. I believe the SearchBar should simply refuse to execute the command when it is unavailable, not change prevent text entry.
Comment 1 Paul DiPietro [MSFT] 2017-02-24 19:03:48 UTC
This is something that will need to be discussed as there is a similar report (#51147) which appears to expect the opposite behavior and that the UI element should be disabled when CanExecute is false. For things such as this we should probably hold some level of consistency for what the user can expect and document it accordingly.
Comment 2 Kent 2017-02-24 22:39:42 UTC
@Paul I'm not sure I agree #51147 is a duplicate. It argues the "button" should be disabled, whereas I'm arguing the "textbox" should not be. Limitations of the native platform may mean they are one and the same, but the visual distinction remains and I suspect is the underlying cause for the differing expectations.