Skip to content

Commit

Permalink
use IOS detection helper in Popover
Browse files Browse the repository at this point in the history
  • Loading branch information
w01fgang committed Nov 27, 2016
1 parent 5a8bac8 commit 826e0fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Popover/Popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Paper from '../Paper';
import throttle from 'lodash.throttle';
import PopoverAnimationDefault from './PopoverAnimationDefault';
import getOffsetTop from '../utils/offsetTop';
import isIOS from '../utils/isIOS';

class Popover extends Component {
static propTypes = {
Expand Down Expand Up @@ -242,7 +243,7 @@ class Popover extends Component {
};

a.right = rect.right || a.left + a.width;
if (/iPad|iPhone|iPod/.test(window.navigator.userAgent) && !window.MSStream) {
if (isIOS()) {
a.bottom = offsetTop + a.height;
} else {
a.bottom = rect.bottom || a.top + a.height;
Expand Down

0 comments on commit 826e0fe

Please sign in to comment.