[3.8] Fix #1218 & 1219 Enhance sharing window

- Fix #1218
- Fix #1219