Bootstrap 3 used to provide functionality to support data-placement="left auto" where it would show the tip on the left if there was enough room, otherwise it would calculate an auto placement.
Bootstrap 4 does not support two placement values, you can only provide left OR auto.
Any idea on how to achieve this in BS4? I was working off this comment along with looking at BS3.js source, but I am getting stuck trying to determine the 'current height/width' of the tooltip to be displayed and from BS3.js, what to use as the 'viewport' (I'm assuming the window
object?)