I am facing an issue where I need to resize my browser window in order to fix a problem with IScroll caused by a promise that alters the width of a very wide element. The trouble arises because the promise modifies the width after IScroll has already loaded, leading to scrolling limitations based on the original element width rather than the updated one provided by the promise. Manually resizing the browser window allows for full scrolling capabilities once the new width is applied.
To address this issue, I adjusted IScroll's maxScrollX
and scrollerWidth
after the promise completes. However, I encountered a setback with an indicator that does not scroll properly despite these changes.
In an attempt to rectify this, I utilized
window.dispatchEvent(new Event('resize'));
to force a window resize. While this method worked effectively in Chrome, it disrupted scrolling functionality in Firefox, Safari, and IE. Is there an alternative approach to forcibly resizing the window that is universally compatible across all browsers?
The following browsers were tested, but none proved successful:
- Safari 5.1.4 (734.54.16)
- Firefox 45.0.2
- Edge 25.10586.0.0