Skip to content
This repository was archived by the owner on Apr 16, 2019. It is now read-only.

panel active not disabled between views #873

Open
tahoetomahawk opened this issue Jun 4, 2015 · 15 comments
Open

panel active not disabled between views #873

tahoetomahawk opened this issue Jun 4, 2015 · 15 comments

Comments

@tahoetomahawk
Copy link

When calling loadContent between views, the last active panel in the view stays active. There will be 2 active panels.
The panel that does not deactivate never will become deactive when transitioning between pages.

This happens by clicking a footer link <a href="#somepage".. or by using $.afui.loadContent

@rvacca2
Copy link

rvacca2 commented Jun 4, 2015

This was an issue posted before, and I don't think it was ever resolved. However, I did link a comment to an existing pull request posted in April #850 .

the update to af.ui.js adds to the runTransition function and removes the active class if found. it works, but it requires a transition to be set when calling the panels, and not sure if it's the best solution.

@tahoetomahawk
Copy link
Author

Just added the code.. works great. Thanks so much!

@tahoetomahawk
Copy link
Author

The side effect is that it hides the background panel when calling a panel within a modal view. Not a big deal though.. I will look into fixing that in a bit

@imaffett
Copy link
Contributor

imaffett commented Jun 8, 2015

@SeekChange @tahoetomahawk - can either of you put up demo's showing the bug and how it's resovled with that pull request/ I'll be happy to merge it.

@tahoetomahawk
Copy link
Author

I used the pull request code as a workaround. It's not quite a resolution
but it gets the job done for now.
Let me know if you still need a pull request, we can put together a sample.

On Mon, Jun 8, 2015 at 10:42 AM, Ian Maffett [email protected]
wrote:

@SeekChange https://github.com/seekchange @tahoetomahawk
https://github.com/tahoetomahawk - can either of you put up demo's
showing the bug and how it's resovled with that pull request/ I'll be happy
to merge it.


Reply to this email directly or view it on GitHub
#873 (comment).

@imaffett
Copy link
Contributor

imaffett commented Jun 8, 2015

@tahoetomahawk - I'm fine accepting the pull request that is there. I've just been asking for demos/tests to show the error and that it has been resolved.

@tahoetomahawk
Copy link
Author

I will include a page with multiple views that shows the issue later this
evening.

On Mon, Jun 8, 2015 at 12:59 PM, Ian Maffett [email protected]
wrote:

@tahoetomahawk https://github.com/tahoetomahawk - I'm fine accepting
the pull request that is there. I've just been asking for demos/tests to
show the error and that it has been resolved.


Reply to this email directly or view it on GitHub
#873 (comment).

@manish-stack
Copy link

@tahoetomahawk : Please upload your solution. I have tried code from #850 but problem is still there.
@imaffett : Can you please look in to this bug as this is pending from a long time & we are not able to migrate our AF2.2 apps to AF3 just because of this issue. Thanks.

@imaffett
Copy link
Contributor

@manish-stack - no one has given me demos/tests/etc

@tahoetomahawk
Copy link
Author

Hi guys,
I haven't uploaded tests. The work around did not work completely, I found
another issue with it. The on panel load gets triggered, but never the
unload. It looks like the bug happens with transitioning between views, not
panels.
Everything seems to work fine within the same view, but using multiple
views things start to break.
The way that headers and footers are defined at the view level forced me to
have to create multiple views. I'm redesigning my UI and creating my own
Footer I can use on certain panels so I can put everything into the same
view.

On Mon, Jul 27, 2015 at 7:32 AM, Ian Maffett [email protected]
wrote:

@manish-stack https://github.com/manish-stack - no one has given me
demos/tests/etc


Reply to this email directly or view it on GitHub
#873 (comment).

@jdinse
Copy link

jdinse commented Jul 29, 2015

Folks, this is really a huge problem we ran into. However, after including these lines from the pull request that @tahoetomahawk mentioned (where were removed in this request, for whatever reason???) at the beginning of runTransition() in appframework.ui.js at line 1218, it works:

            if (typeof previous !== "undefined" && previous !== null) {
                if(previous.find) {
                    setTimeout(function(){
                        previous.find(".active").removeClass("active");
                    },500);
                }
            }

@imaffett
Copy link
Contributor

@jdinse I appreciate it's a huge problem but look at my previous comments. Not one person has given me a demo to test against. All people say is "it doesn't work fix it".

If this fixes your case, open up a pull request and I'll merge it, but you need a demo/test to show it working.

@tahoetomahawk
Copy link
Author

Jay, that work around was not sufficient as the panelunload was not being
called when transitioning from 1 view to another. If you don't need
panelload or panelunload then you should be fine.

On Wed, Jul 29, 2015 at 6:49 AM, Jay Dinse [email protected] wrote:

Folks, this is really a huge problem we ran into. However, after including
these lines from the pull request that @tahoetomahawk
https://github.com/tahoetomahawk mentioned (where were removed in this
request, for whatever reason???) at the beginning of runTransition() in
appframework.ui.js at line 1218, it works:

        if (typeof previous !== "undefined" && previous !== null) {
            if(previous.find) {
                setTimeout(function(){
                    previous.find(".active").removeClass("active");
                },500);
            }
        }


Reply to this email directly or view it on GitHub
#873 (comment).

@jdinse
Copy link

jdinse commented Aug 27, 2015

@tahoetomahawk I found out that it is caused by the fifth Parameter (anchor) in function loadContent(). It changes the current view to what the anchor belongs to for the transition. Therefore it tries to unload the wrong view. Look at lines 1014 ff. in function loadDiv():

        //check current view
        var currentView;
        if(anchor){
            currentView=this.findViewTarget(anchor);
        }
        else
            currentView=this.findViewTarget(this.activeDiv);

So the workaround for me was to not use these fifth parameter right now.

@tahoetomahawk
Copy link
Author

Good find, thanks!!

On Thu, Aug 27, 2015 at 3:21 AM, Jay Dinse [email protected] wrote:

@tahoetomahawk https://github.com/tahoetomahawk I found out that it is
caused by the fifth Parameter (anchor) in function loadContent(). It
changes the current view to what the anchor belongs to for the transition.
Therefore it tries to unload the wrong view. Look at lines 1014 ff. in
function loadDiv():

    //check current view
    var currentView;
    if(anchor){
        currentView=this.findViewTarget(anchor);
    }
    else
        currentView=this.findViewTarget(this.activeDiv);

So the workaround for me was to not use these fifth parameter right now.


Reply to this email directly or view it on GitHub
#873 (comment).

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

No branches or pull requests

5 participants