Comments (6)
Hi @sounakpal, what do you mean by
People using form actions with paper-toast can break in I-Phone safari.
Could you provide a simplified jsbin showing the issue? Here a tentative to show & fix the issue in case you want to keep the toast on the bottom of the screen http://jsbin.com/layeno/4/edit?html,output
Since ios doesn't provide a way to know if the keyboard is visible or not, we can listen to the focus/blur
events and modify the toast margin-bottom
accordingly; the ios keyboard will have different heights according to the orientation, I let you find the right values for those :)
from paper-toast.
Hi @valdrinkoshi I mean if anyone try to open a toast on key press in Iphone safari the toast will not be visible. Form actions mentioned in the previous post was incorrect.Check a live example. Try putting an email and focusout. I would not use the margin top because sizes of the keyboard might change according to phone. And orientation is also an extra handling.
Why not toast having an option to open from top for such cases. Is it hampering any design idea?
from paper-toast.
Hi @sounakpal, tried the live demo and I just get a spinner
from paper-toast.
The Material Design specs want the paper-toast
on the bottom edge of the screen, and should not block the input. The platform doesn't provide a way to know if the virtual keyboard is visible or how big it is in height :/
(check this http://jsbin.com/nixoni/3/edit?html,output, try it from the phone http://jsbin.com/nixoni/3/ )
Having it positioned to the top will require also updating the animation config, and the center
method.
Since paper-toast
extends iron-overlay-behavior
, and the latter extends iron-fit-behavior
, I would suggest this feature to be added to iron-fit-behavior
, where we could have 2 properties horizontal-position
(left, center, right
) and vertical-position
(top, middle, bottom
). Like this, you would be able to do
<paper-toast horizontal-position="left" vertical-position="top"></paper-toast>
If you feel like it, feel free to create 2 PRs to address this :)
from paper-toast.
I am sorry, We had to remove the usage of paper-toast in the link. Yes the example shows the behavior of the platform. Thanks for sharing the approach I will try to send you the PRs as soon as I get some time to work on them :)
from paper-toast.
@sounakpal sounds good, I've created an issue on iron-fit-behavior
to address this new property PolymerElements/iron-fit-behavior#36
from paper-toast.
Related Issues (20)
- Hide then show toast HOT 5
- open() close() etc. methods HOT 1
- Allow custom styling for paper-toast HOT 2
- Toast remaining as invisible barrier in Chrome
- override resetFit rather than center
- paper-toast's alignment abilities is a lie. HOT 5
- The `paper-toast` element is hidden from drawer content on iPad with Safari HOT 4
- <paper-toast> is partially hidden by app-drawer HOT 12
- Pattern to create multiple toast HOT 2
- , HOT 2
- paper-toast doesn't support center alignment HOT 7
- paper-toast does not scroll correctly when fitInto is set. HOT 1
- Callback when toast closes HOT 1
- Button within toast falls out of alignment upon receiving keyboard focus. HOT 3
- Align button HOT 1
- noCancelOnOutsideClick is false but still not closes the toast on clicking on 'paper-tabs' area HOT 2
- this element doesn't appear in any collection webcomponents.org HOT 4
- Toast fitInto/fit-bottom not working correctly. HOT 5
- calling hide() function on paper-toast loses focus on paper-input inside paper-dialog HOT 5
- On-tap doesn't work on mobile HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paper-toast.