diff --git a/Picker.js b/Picker.js index c933b41..16de04d 100644 --- a/Picker.js +++ b/Picker.js @@ -4,7 +4,7 @@ // ...Or maybe a button with a popup menu // License: LGPLv3.0+ // (c) Vitaliy Filippov 2019+ -// Version 2021-11-17 +// Version 2021-11-26 import React from 'react'; import ReactDOM from 'react-dom'; @@ -261,7 +261,7 @@ export default class Picker extends React.Component let left = (input_pos.left + (props.usePortal ? (window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft) : 0) - (document.documentElement.clientLeft || document.body.clientLeft || 0)); - if (left + width > screen_width) + if (left + width > screen_width && width <= screen_width) { left = screen_width - width; }