Fixed the dialog positioning in polyfill