View Issue Details

IDProjectCategoryView StatusLast Update
0001839NoesisGUIC++ SDKpublic2021-01-14 13:14
Reportersatorp Assigned Tosfernandez  
PrioritynormalSeveritymajor 
Status resolvedResolutionfixed 
Product Version3.0.7 
Target Version3.0.8Fixed in Version3.0.8 
Summary0001839: ListBoxItem selection is always reverted to the last focused item
Description

Consider two Views sharing a single VM which has an LBIndex property. Each View has a ListBox with its SelectedIndex bound to the VM's LBIndex property (ListBox1 on View1, and ListBox2 on View2).

  • Click on 1st item of ListBox1 (→1st item of ListBox2 is also selected due to binding)
  • Click on 2nd item of ListBox2 (→2nd item of ListBox1 is also selected due to binding)
  • Activate View1 by clicking anywhere on the view (except on ListBox1)
  • Notice that the 1st item of ListBox1 is automatically re-selected (and so is the 1st item of ListBox2)

It seems that ListBoxItem always tries to select itself on view activation when it's the last item that received the input focus before the view is deactivated. Since selection state and input focus are two different concepts, I think the selection should not be automatically set. This is also how it works on WPF.

PlatformWindows

Activities

sfernandez

sfernandez

2020-11-17 12:34

manager   ~0006763

You mean you have different IView objects? Is this because you have different operating system windows?

satorp

satorp

2020-11-17 13:20

reporter   ~0006764

We have two windows, each with its own IView* (returned by Noesis::CreateView) of two XAML instances. The two XAMLs share the same VM instance.

sfernandez

sfernandez

2020-11-17 14:10

manager   ~0006765

Ok, I checked with WPF and found that we are incorrectly changing selection when a ListBoxItem gets focus from code. WPF does not change list selection in that case. Will fix it for next release.

satorp

satorp

2020-11-17 14:32

reporter   ~0006766

Thank you for the quick response. When is the next scheduled release? In the mean time, do you have any suggestion for workaround?

sfernandez

sfernandez

2020-11-17 16:06

manager   ~0006767

One workaround could be to remove the focus from the ListBoxItem before deactivating the view, that way, when it gets activated again, it won't restore the focus to the ListBoxItem and change the selection.
Could that work for the time being?

sfernandez

sfernandez

2020-12-02 10:39

manager   ~0006854

Is the workaround a valid option for you? Can we lower the priority on this?

satorp

satorp

2020-12-02 14:25

reporter   ~0006855

Last edited: 2020-12-02 23:56

Sorry for late reply. I thought I've replied to this before, but don't know why the note was not added.
Thank you for the workaround suggestion, but currently it's difficult to implement in our system. We still have about 1-2 months time frame, so it's fine to lower the priority for now if we can get the fix by the next release.

sfernandez

sfernandez

2020-12-03 14:07

manager   ~0006859

Fixed for the upcoming 3.0.8 version.

Issue History

Date Modified Username Field Change
2020-11-17 12:20 satorp New Issue
2020-11-17 12:34 sfernandez Assigned To => sfernandez
2020-11-17 12:34 sfernandez Status new => feedback
2020-11-17 12:34 sfernandez Note Added: 0006763
2020-11-17 13:20 satorp Note Added: 0006764
2020-11-17 13:20 satorp Status feedback => assigned
2020-11-17 14:10 sfernandez Note Added: 0006765
2020-11-17 14:10 sfernandez Product Version 3.0 => 3.0.7
2020-11-17 14:10 sfernandez Target Version => 3.0.8
2020-11-17 14:32 satorp Note Added: 0006766
2020-11-17 16:06 sfernandez Status assigned => feedback
2020-11-17 16:06 sfernandez Note Added: 0006767
2020-12-02 10:39 sfernandez Note Added: 0006854
2020-12-02 14:25 satorp Note Added: 0006855
2020-12-02 14:25 satorp Status feedback => assigned
2020-12-02 23:56 satorp Note Edited: 0006855
2020-12-03 14:07 sfernandez Status assigned => resolved
2020-12-03 14:07 sfernandez Resolution open => fixed
2020-12-03 14:07 sfernandez Fixed in Version => 3.0.8
2020-12-03 14:07 sfernandez Note Added: 0006859