Use Math.ceil() when computing a modalbox's position.

Review Request #6162 — Created July 28, 2014 and submitted

Information

Djblets
release-0.8.x
e95eb6f...

Reviewers

modalBox would listen for updates to the content within the box and
attempt to update its size and position accordingly. These values could
end up being non-integers, causing elements to subtly jump.

To fix this, we just need to use Math.ceil() on the values to ensure
that we get whole numbers.

Saw this issue in a modalBox I had built. Some small updates would just
cause the box's contents to shift just a bit. That no longer happens
after this change.

reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        djblets/static/djblets/js/jquery.gravy.modalBox.js
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        djblets/static/djblets/js/jquery.gravy.modalBox.js
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.8.x (2edd597)
Loading...