ericmmartin / simplemodal

A modal dialog framework for jQuery
http://simplemodal.com/
Other
507 stars 229 forks source link

Update getDimensions function to ensure that w[] has non-zero values #15

Closed yellis closed 3 years ago

yellis commented 12 years ago

Ran into a bug using simplemodal on IE9 where wndw.Width() and .height() as used in the getDimensions function returned zero. This resulted in top/left being set to the wrong numbers, modal being off-center. Corrected by checking in getDimensions that values are > 0 before initializing the w[] array with them.