Popup position problem (with V9.4 -as V10 is not possible to download)

Please report bugs here. If you are unsure whether something is a bug or an expected behavior, please post it on the "Technical Support" forum instead, and wait for a moderator to handle/move the post.
Sesztak
Posts: 172
Joined: Fri Jun 24, 2016 2:19 am

Popup position problem (with V9.4 -as V10 is not possible to download)

Postby Sesztak » Thu Sep 29, 2016 6:36 am

Dear JS-Support.

We have found a bug with Popup positioning. (HorizontalOffset and VerticalOffset).

Background info: we have a TabControl with e.g. 3 TabItems. The tabitems has different heights: e.g. the first one short and a last one height is higher than a screen height (you have to use scrollbar to scroll to the bottom of it).

So (this is the importan part): the Popup offsets seems like to be calculated from the actual Tabitem end (Height in this case) and NOT from top of the application window !!!

Please, check it at your side as well,
Can you reproduce the bug ?

(normally the origo of popup left/top edge is a application window: but in the found bug: the last DOM element)

Waiting for your kind reply,
Br,
Péter

ps.: What happend with v10 beta link/attachment ?: there is no link to download ....

JS-Support
Site Admin
Posts: 670
Joined: Tue Apr 08, 2014 3:42 pm

Re: Popup position problem (with V9.4 -as V10 is not possible to download)

Postby JS-Support » Thu Sep 29, 2016 7:48 am

Hi,

Thanks for reporting this issue. If you could isolate the issue into some XAML snipped that we can copy/paste to reproduce the issue, it would be really great. We are going to investigate.

Sesztak wrote:ps.: What happend with v10 beta link/attachment ?: there is no link to download ....

We have just added the download link to the original post. Can you please check again?

Thanks.
Regards,
JS-Support

Sesztak
Posts: 172
Joined: Fri Jun 24, 2016 2:19 am

Re: Popup position problem (with V9.4 -as V10 is not possible to download)

Postby Sesztak » Thu Sep 29, 2016 9:42 am

Dear JS-Support,

Please, find bellow the cripped sample code -and see the attached complete solution as a zip file:
Solution/Project name: CSHTML5_v10_PopUpPositionBUG

XAML:
<Page
x:Class="CSHTML5_v10_PopUpPositionBUG.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:CSHTML5_v10_PopUpPositionBUG"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<StackPanel x:Name="firstContainerAfterPage">
<Button x:Name="toggleButtonShowHidePopup" Content="Show / Hide Popup" Click="toggleButtonShowHidePopup_Click"/>
<TabControl Margin="0,30,0,0">
<TabItem Header="TabItem 1 -small content in summa Height">
<StackPanel>
<Button Content="sample button on Tab 1"/>
<Button Content="sample button on Tab 1"/>
<Button Content="sample button on Tab 1"/>
</StackPanel>
</TabItem>
<TabItem Header="TabItem 2 -LOT of content in summa Heigh">
<StackPanel>
<Button Content="sample button on Tab 2"/>
<Button Content="sample button on Tab 2"/>
<Button Content="sample button on Tab 2"/>
<Button Content="sample button on Tab 2"/>
<Button Content="sample button on Tab 2"/>
<Button Content="sample button on Tab 2"/>
<Button Content="sample button on Tab 2"/>
<Button Content="sample button on Tab 2"/>
<Button Content="sample button on Tab 2"/>
<Button Content="sample button on Tab 2"/>
<Button Content="sample button on Tab 2"/>
</StackPanel>
</TabItem>
</TabControl>

<Popup x:Name="popup" Height="150" Opacity="0.9" HorizontalOffset="50" VerticalOffset="20">
<StackPanel>
<Thumb x:Name="thumb" DragDelta="thumb_DragDelta">
<Thumb.Template>
<ControlTemplate>
<Border Margin="3,3,3,0" Padding="10" Background="Yellow" CornerRadius="5,5,0,0" Opacity="0.9">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
<Button Content="Some Content - UP UP You shoud move popup by Draging Upper Yellow Part UP UP" Margin="10" Padding="10"/>
</StackPanel>
</Border>
</ControlTemplate>
</Thumb.Template>
</Thumb>
</StackPanel>
</Popup>

</StackPanel>
</Page>


C# code behind:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace CSHTML5_v10_PopUpPositionBUG
{
public partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}

bool IsChecked = false;
private void toggleButtonShowHidePopup_Click(object sender, RoutedEventArgs e)
{
IsChecked = !IsChecked;
popup.IsOpen = IsChecked;
}

private void thumb_DragDelta(object sender, Windows.UI.Xaml.Controls.Primitives.DragDeltaEventArgs e)
{
popup.HorizontalOffset += e.HorizontalChange;
popup.VerticalOffset += e.VerticalChange;
}
}
}

Recommended way to reproduce the behaviour of bug:
1., first: do not touch any TabItem ! Play only with "Show / Hide Popup" button -remember the position of it,

2., secondly: click to ""TabItem 1 -small content in summa Height"" tabitem: Play with "Show / Hide Popup" button -see the position of it:
if the popup comes visible again it position has changed comparing point 1. (the bug popped up)

3., thirdly: click to "TabItem 2 -LOT of content in summa Heigh": tabitem: Play with "Show / Hide Popup" button -see the position of it:
if the popup comes visible again it position has changed a lot comparing point 1 and 2. (the bug popped up)

4., at last: you can Drag & Drop the popup by dragging yellow thumb of to see the bug again.

Important: the bug comes when the popup.IsOpen comes true (I mean if it is visible it will not JUMP to the incorect position).
Important 2: same behaviour in Simulator and in real Browser

Please, inform about the progress.

+1: sorry for a small bad news at the end: we have found another bug during this investigation: -if you put a Button as a FIRST element of CANVAS => Click event never hitted ! :(

To reproduce this issue, try to change : <StackPanel x:Name="firstContainerAfterPage"> to <Canvas x:Name="firstContainerAfterPage">

Thanks in advance,
Have a nice day!
Péter
Attachments
CSHTML5_v10_PopUpPositionBUG.zip
(1.12 MiB) Downloaded 17 times

JS-Support
Site Admin
Posts: 670
Joined: Tue Apr 08, 2014 3:42 pm

Re: Popup position problem (with V9.4 -as V10 is not possible to download)

Postby JS-Support » Tue Oct 25, 2016 6:25 am

Thank you very much. We are going to look into it. I'll keep you updated asap.

Regards,
JS-Support


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 2 guests

 

 

cron