Bootstrap: Scroll Model to Center Focused Field - css

Is there any way to make a modal automatically scroll when a form field inside it is focused in order to center it? I think it would be useful when dealing with form in mobile devices with virtual keyboards
UPDATE
Try this bootply http://www.bootply.com/2tPE0xj7GX# with your smartphone and fill the form fields. You will notice the keyboard overlaps the fields

As I said. On every sane mobile OS the focussed input should get perfectly centered in the remaining screen portion. It at least does so on iOS.

Related

Can't scroll up list on web iPhone

I'm building a reactjs widget which has scrollable lists (vertically) inside it, which takes the entire viewport on mobile (I prevent the default for "touchmove" on the window so as not to scroll the background).
But when I open the widget on iPhone (tested on both Safari and Chrome), I can scroll down the list, but can't scroll back up! if I want to scroll back up, I need to scroll a bit down before I scroll up (one action, without lifting the finger).
I also have reversed lists (same design, only with flex-direction: column-reverse), and I have the exact same behavior regardless of the flex direction.
I also noticed that the "touchmove" event on the list is not firing when I can scroll, but it is firing when I can't.
It works great on desktop, tablets (iPad as well) and android devices - just not on iPhone.
I need the scroll to work both ways on iPhone as well
It was my mistake - it was a combination of using body-scroll-lock and preventDefault of "touchmove" on the body.
All fixed now

Keyboard covers focused input field in forms within Angular Material dialog component in mobile devices

I have a form inside an Angular Material Dialog component. My problem is that when an input field gets focus, the keyboard opening in mobile devices covers the input field the user wants to write into.
When the keyboard opens the main body of the HTML gets az appropriate margin-bottom, however, this does not apply to the dialog's wrapper (cdk-overlay-container), since it's position is fixed.
My ideas:
1, Changing from fixed to absolute could solve my problem, however since my main container is a huge scroll-container, that would only work if I scroll to the top programmatically, which I don't really like.
2, If I could detect that a keyboard was opened, I could add a class to a parent container, however, I'm not sure how to do this without attaching an event to every input field we have, which feels ugly and unnecessarily heavy (since I'd have to send events to notify other components). I would also need to know the size of the keyboard, which I'm not sure is possible.
The issue occurs on both Android and iOS.

Fix variant select wrapper width (SqSp)

On my individual product pages, there are drop down selection boxes which display the variants for my products. Because some of the variants have longer descriptions, this box becomes longer.
It's fine on the desktop site, but on mobile, the selection bar extends past the edge of the page. This seems to be interfering with a mobile menu I have at the top of the page.
As far as I can tell, i should be targeting 'variant-select-wrapper' but I have looked around a lot can't seem to find a way to shorten this box so that it fits on a mobile display.
Does anyone know a way to effectively shorten or fix the width of this box, or am I targeting the wrong thing?
Thanks
The following CSS ought to work for you, added to the CSS Editor in Squarespace (or to your CSS files if you're using Dev. Mode).
.variant-option select {
max-width: 100%;
}
This will limit the select box width itself so that it does not extend beyond its parent's width. This does not affect the width of the options within the select box, which will continue to extend outside of the parent (and the browser window for that matter) on Windows devices. However, on Android and iOS, the options will appear in a modal-like box, with the options of the text wrapped. This is an acceptable user experience in both cases I think.
To wrap the options on Windows devices, Javascript is needed (Ref. 1, Ref. 2), which is why I think this simple CSS approach is a reasonable compromise.

Use scrollbars for the display of a continous form in Microsoft Access2007

I have a continuous form with many control elements ordered in two columns. The form is opened with the WindowMode 'acDialog'.
When I take a look at this form at my desktop computer there is no problem. But I want to use the application also on my laptop. When I open the form on my laptop, I only see the first entries, but not the others anymore. Unfortunately I havent found an opportunity to use scrollbars in my form.
What I have found is this (did not work):
Add or remove scrollbars
Edit:
The View should look like:
but on my laptop it looks like:
So I want to have scrollbars. The scrollbar property is set to both directions.
Edit 20121126, the design view. The blue part is header, the txts are in the detail view and the buttons are in the footer:
This problem has stumped me before. Access is not smart enough to realize if the screen is set to a different 'zoom' than 100%. So Access is thinking that the entire form is on your screen when really it is not.
This really only applies if you have Windows 7 and maybe 8, but I have no idea about that. If you go to your display property (right click the desktop and select 'Personalize' then Display in the lower left-hand corner of the pop-up.)
If you are not set at 100% then access is missing 25-50% of your screen. access goes off of pixels, which is set in the resloution, but when using 125% Windows expands everything by 25% and that can push things right off the screen. The form does not need scroll bars to fit on your screen, just need to set your zoom to 100%.
I found this out by having a 'control bar' set to be x-250 pixels from the left (where x is total left to right pixels). However one computer could never see the control bar and it was because the screen was +125%. I have never been able to figure out how to get the current 'zoom' from Windows. I have searched through all manner of API's. I hope this is the solution you were looking for! Good Luck!!

iPad SplitView Master View shows but with minor (and incorrect) variation

I'm practicing development of a simple iPad Split View app (Stanford's Hegarty online class). And everything works for the most part. However, the Master side ('left side), although working in landscape mode looks a little different than what I expect it to as a 'popover' in portrait mode. The 'popover' covers the left side of the screen including the toolbar button item that triggered it where normally it should not cover that button.
Unfortunately I can't post images so I'll try my best to describe in more detail. Normally the 'proper' popover will be hovering right below the bar item button that triggered it with a thick arrow-ish thingie (the 'anchor') pointing to the button and not covering that button. The popover can be dismissed by clicking on that button again (or elsewhere on the screen).
What's happening to me, however, is that when I click the bar item button to show the popover, the resulting popover 'covers' the button and essentially fills up the left portion of the screen (the detail view is under it and most of it is showing) with its designated width (so, again, it doesn't cover the entire detail view). The is no 'anchor' arrow pointing to the bar item button since it is obviously covering it instead. The popover is dismissed normally once I click anywhere else on the screen.
So why is my popover covering the button and not simply hovering under it with an 'anchor' pointing to it as it should?
I don't think it it makes much sense to post code at this point because I don't think it'll help and more importantly not sure what portion to post considering this might be a problem with how I wired it in the Builder. Any thoughts will be greatly appreciated!
Thanks!
Mo
I believe its a change that came in IOS5.1
If you want the same behaviour you probably need to set the master up as a popover segue, from a toolbar button or similar in the detail view, and set the split view delegate to not show the master in portrait.
I'm on the move now but if you want any more info let me know and I'll try and get back to you later.

Resources