Skip to content

Commit

Permalink
fix arrow for bootstrap compability
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalets committed Sep 16, 2012
1 parent ad9d5e5 commit 162eabb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/bootstrap-editable.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,12 @@
break;
case 'top':
/* For Bootstrap 2.1.x: 10 pixels needed to correct popover position. See https://github.com/twitter/bootstrap/issues/4665 */
if($tip.find('.arrow').get(0).offsetWidth === 20) {actualHeight += 10}
if($tip.find('.arrow').get(0).offsetHeight === 10) {actualHeight += 10}
tp = {top:pos.top - actualHeight, left:pos.left + pos.width / 2 - actualWidth / 2};
break;
case 'left':
/* For Bootstrap 2.1.x: 10 pixels needed to correct popover position. See https://github.com/twitter/bootstrap/issues/4665 */
if($tip.find('.arrow').get(0).offsetHeight === 20) {actualWidth += 10}
if($tip.find('.arrow').get(0).offsetWidth === 10) {actualWidth += 10}
tp = {top:pos.top + pos.height / 2 - actualHeight / 2, left:pos.left - actualWidth};
break;
case 'right':
Expand Down

0 comments on commit 162eabb

Please sign in to comment.