JQueryMobile, Autocomplete and vertical scrollbar on iPAD safari - jquery-mobile

I am using jQuery Autocomplete on my jQUeryMobile application. It works perfect. Now I'm trying to show vertical scrollbar to scroll through the list of looked up items. The scrollbar shows up on desktop safari, but not on iPAD safari. my css looks like this:
<style>
.ui-autocomplete
{
max-height: 100px;
overflow-y: auto;
/* prevent horizontal scrollbar */
overflow-x: hidden;
max-width:70%;
}
</style>
Can someone help, thanks!

Add this to your style:
-webkit-overflow-scrolling: touch;
Put the above style in CSS document of class body.....

Related

text-overflow: ellipsis ignoring right padding on mobile

I have a div styled to truncate centered text with an ellipsis, with some padding on each side. It works when using a desktop browser, but on iPad the text seems to ignore the right padding and becomes centered incorrectly.
I'm using this for the styling:
div {
text-overflow: ellipsis;
width: 120px;
padding: 0 38px;
overflow: hidden;
white-space: nowrap;
border: 1px solid black;
text-align: center;
}
An example can be seen here. View on iPad to see the problem. http://jsfiddle.net/35Lyk9yp/
I'm thinking this might be some bug with the mobile browsers? It didn't work on iOS Safari or Chrome, but it's ok on Windows Safari and Chrome and Firefox. Is there a simple workaround for it?
Edit:
I found a workaround by using an inner div with the content that I used to do the ellipsis, and then used the outer div to set the padding. If there is a way around it with one element though, please let me know.
In order to get your code to work you need to have CSS overflow, width and display.
You are probably missing the display.

responsive iframe with SurveyMonkey

I'm working on embedding a very quick survey on my site and after page one, there is just description text for page 2 and 3. So how do I a) make the iframe responsive to the number of questions or b) get rid the other ugly gray bottom when the description text appears? I don't mind the scroll bar but in a dream scenario what I would like is no scoll bar - all 4 questions fit on the page and then the continue button on page 2 shows up with no grey box.
The iframe code I have on the page is:
with the following CSS:
<style>
.survey-container {
position: relative;
}
iframe {
border-style: none;
background-color:transparent;
min-height: 400px;
max-height: 600px;
overflow: hidden;
}
</style>
http://i.stack.imgur.com/WP1dZ.jpg
Using the embed script provided by Surveymonkey, I was able to make the embedded survey width:100% by nullifying the max-width property through CSS:
.smcx-embed {
max-width: none !important;
}
.smcx-embed iframe {
max-width: none !important;
}

Fixed positioned div hidden on Safari

Following a previous question - Overflow issue in a fixed position sidebar - I have a list of links with a fixed div showing on li:hover
http://codepen.io/anon/pen/RNxyVP
This works great on all the windows browsers - Chrome, Firefox, Explorer, Opera, and old windows Safari. However on the latest edition of Safari (on Mac) and by extension on iOS the fixed div reveal stays in the grandfather fixed div, and doesn't float over the rest of the page. This also happens on android chrome.
Is there a way to have the fixed div float over the page, and not be restricted to the wrapper - on these browsers?
The other factors such as the wrapper div being scrollable (currently through overflow-x: hidden;) would also have to be kept/
because you set your sidebar-wrapper 'position:fixed', in Mac's webkit browser, if an fixed element has a fixed overflow:hidden parent, this element will be hidden.
please check this
#sidebar-wrapper {
width:200px;
background-color:#396DA5;
position:fixed;
height: 100%;
}
#menu ul ul {
display: none;
list-style: none;
}
#menu ul li:hover > ul
{
display: block;
}
#menu ul ul {
padding:50px;
position: absolute;
left: 150px;
background:#f00;
margin-top:-20px;
}

-webkit-overflow-scrolling : touch in jQuery Mobile panels under iOS 5

I know this problem has already been discussed, but I'm not here for the scroll in jQM panels. The solution given here works perfectly : Scroll JQuery Mobile Panel Separately From Content
.ui-panel.ui-panel-open {
position:fixed;
}
.ui-panel-inner {
position: absolute;
top: 1px;
left: 0;
right: 0;
bottom: 0px;
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
At least under iOS 6 and 7.
Under iOS 5, it doesn't work at all. I can scroll the content of the page, but the panel stays fixed when I open it. I tested the -webkit-overflow-scrolling : touch property, and it works in other websites. I just need it working with jQuery Mobile.
The website would be perfect if you could help me to make this work!
Thank you all in advance,
Adrien B.

Why does a normal web page appear zoomed way out on iOS?

Why does this jsfiddle page appear so far zoomed out when viewed on Mobile Safari on iOS 6.1? I'd expect it to take up the entire width, but it zooms way out instead. I have pretty boring CSS as follows, but I'm missing something.
.foo {
overflow: auto;
overflow-y: hidden;
height: 100px;
-webkit-overflow-scrolling: touch;
white-space: nowrap;
}
.foo ul li {
display: inline-block;
border: 1px blue solid;
max-width: 100px;
overflow: auto;
white-space: normal;
}
Add
<meta name="viewport" content="initial-scale=1.0,width=device-width" />
inside the <head>
Working example (standalone)
Working example (jsfiddle)
Background: By default, mobile Safari displays pages with a canvas width of 980px (see this answer), the 'width' parameter overrides this and 'device-width' automatically sets it to whatever size (or portrait/landscape orientation) you're using. It was initially introduced by Apple but pretty much everything now supports it.
For this to work in jsFiddle, you need to add the meta tag to the CSS pane but wrap it in a </style> / <style type="text/css"> tags so it appears in the head. Also, the ordinary embed sharing link won't work, as everything is wrapped in an iframe, so you need to break out the contents of that directly: .../show/light/
(If you have a Mac, the iOS Simulator is handy for this kind of thing - requires installing XCode. Also Chrome Dev Tools > Settings (cog icon, bottom right) > Overrides > Device Metrics)

Resources