setting selected after calculation going crazy on mobile safari web app