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

Improve hide of elements and remove fade delay at initialization #13

Closed
prisky opened this issue Oct 19, 2014 · 4 comments
Closed

Improve hide of elements and remove fade delay at initialization #13

prisky opened this issue Oct 19, 2014 · 4 comments

Comments

@prisky
Copy link

prisky commented Oct 19, 2014

Noticed a strange behaviour - though explainable ... ish - without digging too deep. Thought I would mention in case it is a bug.

Wanted to set focus after the detail view drawn. The problem was focus was being called before the item was unhidden by the default 800 fadeDelay setting and the fact that kv-hide seems to be applied by default to input items when they are drawn. Setting fadeDelay to 0 had the strange behaviour on some of my views of leaving the inputs hidden. I guess this is result of show being called prior to the item being drawn due some kind of asynchronous mis-behaviour.

I am loading the detail view into a modal via ajax - not sure if this is having a bearing.

Basically, is there a reason for kv-hide to be applied when enableEditMode true in renderAttribute ?

For now as fix I have overridden this and removed kv-hide from there, and all seems to be working ok now.

I would prefer not to override this if I can of course.

Cheers for the awesome extensions

@kartik-v
Copy link
Owner

I probably need more info to understand your use case clearly.

The kv-hide class is set to hide the editable inputs when detail view is in NORMAL view mode.

This is needed at INITIALIZATION of detail view --- based on WHAT your initial mode is (it is mostly VIEW mode for detail view by default).

The inputs are anyway also hidden or made visible (faded out or in) when the buttons are used to toggle between the modes.

@kartik-v kartik-v changed the title possible bug fadeDelay 0 and kv-hide Improve hide of elements and remove fade delay at initialization Oct 19, 2014
@kartik-v
Copy link
Owner

Resolved via dd62f15 and upgrade to release v1.2.0.

@kartik-v
Copy link
Owner

You need not remove the fadeDelay for your use case until necessary. Since, with the new release, at initialization the validation to display the right elements is done at server (PHP) itself instead of client (JS).

@prisky
Copy link
Author

prisky commented Oct 19, 2014

Perfect - even able to remove setTimeout around the focus so far.

Cheers

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

No branches or pull requests

2 participants