Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EdgeNavigator possible regression #1171

Open
argsalmeida opened this issue May 15, 2018 · 3 comments
Open

EdgeNavigator possible regression #1171

argsalmeida opened this issue May 15, 2018 · 3 comments

Comments

@argsalmeida
Copy link

Describe the bug
I have a edge navigator on my app and it was working fine. Since the update to 1.8.0 it stopped working. It is not possible to interact with the elements when using the EdgeNavigator. When commenting this piece of code then we are able to interact again.

To Reproduce
Steps to reproduce the behaviour:
I've made a minimal reproduction of this, just to be easier to show the issue. It's just an implementation of edge navigator with a button to open it.

<App>

    <!-- Opens the left edge menu -->
    <UserEvent ux:Name="requestMenu"/>
	<OnUserEvent EventName="requestMenu">
		<DebugAction Message="REQUESTING MENU" />
		<Set edge.Active="menu"/>
	</OnUserEvent>

	<!-- Closes the left edge menu -->
	<OnUserEvent EventName="dismissMenu" Handler="{dismissMenu}"/>

	<EdgeNavigator ux:Name="edge">
        <DockPanel Color="#955CA1" Edge="Left" ux:Name="menu">
            <ActivatingAnimation>
				<Change block.Visibility="Visible"/>
				<Change block.Color="#0005"/>
			</ActivatingAnimation>

            <StackPanel>
                <!-- Build the options in the menu -->
                <Each Items="{menuOptions}">
                    <MenuOptions Text="{text}">
                        <Clicked>
                            <Callback Handler="{gotoSelectedPage}"/>
                            <RaiseUserEvent EventName="dismissMenu"/>
                        </Clicked>
                    </MenuOptions>
                </Each>
            </StackPanel>
        </DockPanel>

		<Panel>
			<Rectangle Layer="Overlay" Visibility="Collapsed" Color="#0000" ux:Name="block"/>
		</Panel>
	</EdgeNavigator>

    <!-- option on the menu -->
    <Panel ux:Class="MenuOptions" HitTestMode="LocalBounds" Margin="0,0,0,35">
        <string ux:Property="Text" />

        <!-- Text for the option -->
        <Text Value="{Property Text}" FontSize="17" Margin="15,0,15,0" Alignment="CenterLeft" Color="White"/>

        <!-- Animation -->
        <WhileInactive Threshold="0.4">
            <Move Target="this" X="-180" Duration="0.3" Delay="0.3" Easing="CircularIn" />
        </WhileInactive>
        
    </Panel>

    <!-- A button to open the menu -->
    <Button Text="Click Me!" Clicked="{click}"/>

	<JavaScript>
        var Observable = require("FuseJS/Observable");

		function dismissMenu() {
			edge.dismiss()
		}

        function click(){
            console.log("click")
            requestMenu.raise();
        }

        var options = [];
        var menuOptions = Observable();

        function setOptions(){
            options = [];
            menuOptions.clear();
            options.push({"text" : "Option One"});
            options.push({"text" : "Option Two"});
            options.push({"text" : "Option Three"});
            options.push({"text" : "Option Four"});
            options.push({"text" : "Option Five"});
            menuOptions.replaceAll(options);
        }

        setOptions();

        module.exports = {
            dismissMenu : dismissMenu,
            click : click,
            menuOptions : menuOptions,
            setOptions : setOptions
        }

	</JavaScript>

</App>
  1. Run this code.
  2. Try to click on the button.
  3. It's not possible to click the button and open the navigator.

Expected behavior
This was working on version 1.7.9. The edge navigator should not prevent us to interact with the elements and should open when clicking the button.

Smartphone (please complete the following information):

  • Device: OnePlus 3 / iPhone 6
  • OS: Android 8.0.0 / iOs 11.3.1
@BeeWarloc
Copy link

Hi, thanks for the bug report.

FWIW, I tested this and can confirm this appears to be some kind of regression.

Unfortunately I don't have experience with this code or time to look more into this, however there has been some recent changes to the EdgeNavigator here and here. So if you (or anyone else) wants to dig into this, then studying those changes could possibly be a good place to start. :)

@kusma
Copy link
Contributor

kusma commented Jun 18, 2018

Maybe @mortoray has an idea here?

@mortoray
Copy link
Contributor

This might be a corner case that worked before by accident.

In this setup you have a Button behind the EdgeNavigator. There main page of the navigation is however empty, and the buttons behind it may have worked before for some reason, even though this wasn't really a considered situation (the controls should either be part of the navigator's main content, or overlayed on top).

There's probably a way we could get this to work, but it seems more like a feature than a bug fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants