-
Notifications
You must be signed in to change notification settings - Fork 144
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
possible to NOT scroll for a state? #59
Comments
@backprop Currently there is no way to turn off the scrolling. Without looking at an example a quick hack would be to call $.prompt.position() in the window's scroll event or set an interval to call it every so often. If jquery mobile's header uses css fixed positioning using the window scroll event may work. But I have a feeling they use some javascript/jquery to keep that bar pinned to the top of the window, making it likely that a setInterval() may be needed. var intvl = null;
$.prompt('test', {
loaded: function(){
intvl = setInterval(function(){
$.prompt.position();
}, 500);
},
close: function(){
if(intvl){
clearInterval(intvl);
}
}
}); Again this is a hack to maybe get your app going, but a full solution may take time to develop depending on how jquery mobile handles this. |
@trentrichardson Thanks for the reply. I put in the interval as noted. What happens is that the prompt keeps "chasing" the container until the content bottoms out. If the container gets repositioned vertically - like the jquery mobile footer - eventually it runs out of room to scroll and the prompt catches up. I also tried it on a jquery mobile side panel, which is effectively the same thing, now that I think about it. The content 'behind' the panel keeps scrolling until it hits bottom. We can work around it for sure, but if possible I think it would be a great option for these situations to position a prompt ((individually) without scrolling. Impromptu makes a really cool walkthrough for mobile apps. Thanks again. |
@backprop I wanted to touch base on this issue as some changes were made in the most recent release around not scrolling if the target item is within screen view. It was more geared for static elements, so I'm not sure if it will work well with fixed position as you have. |
@trentrichardson Thanks for the follow up. The fixed element does still cause the chasing sequence. We've changed how we present a few of the elements on screen so have gotten past that. If there ever is a "turn off scrolling for this prompt" switch, it would be great. Otherwise we'll make it work as is. Thanks again. |
I have an impromptu walkthrough which works great. But one prompt points to an item that uses CSS to remain static on the page (like a jquery mobile header or footer). When I get to the prompt to point to that menu, the page scrolls, the prompt opens, but then the menu re-positions itself. Then the prompt is left hanging in the middle, pointing at nothing. I bought the ebook, but couldn't find a clue..is it possible to turn off scrolling for a specific state? That would solve the issue.
Thanks for the great plugin.
The text was updated successfully, but these errors were encountered: