If the user moves a modal window in JQuery UI so far up the screen that the title header bar is off the top underneath the browser buttons, then they let go so it stays there, how can they then grab the window again to bring it back into view?
For example, go here and move the modal window up with your mouse until the top half of it is hidden under your browser's address bar then release it. Now what? Is there some way to move it back down or is it stuck there?
When using the filtered lists, the created inner form actually submits when pressing Enter on desktop or the Go button on an iOS device. This causes the page to redirect to itself. There should be nothing done to the URL or navigation when the user ends the filter with Enter or Go.
If you just close the list or select something in the list, it works okay. The issue is "submitting" from the filter input.
One of the things that I kept running into was live data not updating the screen elements with JQuery Mobile, especially when using templates & KnockoutJS data binding.
The way I found to "force" it to update the components with the new data is to call the function shown below after any live updates to data on the screen.
function forcePageRefresh() { // force page refresh (why is this needed???) var body=$('body'); body.height(9999); setTimeout(function() { body.height(0); }, 10); }
It's a simple brute-force trick but seems effective and hardly noticeable, if at all, to users. In fact, to keep code simple and not have a million of these calls scattered throughout, I created a pageShow handler and called this at the end.
$('div[data-role="page"]').live('pageshow', function(event, ui) { // called for every page after it becomes active // do whatever else you need here.. forcePageRefresh(); });
I have the following code which I've changed a million times trying to find the "right" trick but it still doesn't work in Safari. All attempts have worked in Firefox. All I'm trying to do is dynamically build a div from a query to display a series of images. My header has zoom in/out buttons which should resize each image in the div. Safari works only AFTER I resize the browser window just a nudge. Once I do that one time, the zoom function works great.
Why does Safari need this browser resize before the image zooming happens when Firefox does not? Any way I can do this from script so the user doesn't have to physically do it? I've tried it with and without the enclosing inner div.
var html = '<center>';
for(var pg=1; pg<=pages; pg++)
{
var mp = pages+'';
var cp = pg+'';
while(cp.length < mp.length) { cp = '0'+cp; }
html += '<div class="pdfpage" style="width:100px; height:100px"';
html += ' <img style="width:100%;height:100%" src="/ionmed/reports/'+id+'-doc-'+cp+'.png?rand='+Math.random()+'" />';