LPS-42902

Please review this PR from Jordan.
Original for reference: https://github.com/blzaugg/liferay-portal/pull/92

I'd like to you evaluate whether this fix
 - [x] Has any merge conflicts with `master`
 - [x] Is the "proper/most correct" way to solve this bug.
 - [x] Works as intended in: IE11, IE10, IE9, Firefox, Chrome.
 - [x] Causes any regressions in IE11, IE10, IE9, Firefox, Chrome.
 - [x] Follows our code formatting.

Make any corrections to remedy any issues you find, then send this back to me.