Permalink
Browse files

fixed an issue with ie when the toolbar is fixed

  • Loading branch information...
madwire committed Nov 30, 2012
1 parent c10fc5b commit a8acb0ecf21c4ce10115f8230755e864ac71b6c0
Showing with 5 additions and 7 deletions.
  1. +5 −7 src/toolbar/fixed.coffee
View
@@ -31,17 +31,15 @@
widthToAdd += parseFloat el.css('padding-right')
widthToAdd += parseFloat el.css('border-left-width')
widthToAdd += parseFloat el.css('border-right-width')
- widthToAdd += (parseFloat el.css('outline-width')) * 2
- widthToAdd += (parseFloat el.css('outline-offset')) * 2
+ try
+ widthToAdd += (parseFloat el.css('outline-width')) * 2
+ widthToAdd += (parseFloat el.css('outline-offset')) * 2
jQuery(@toolbar).css "width", el.width() + widthToAdd
_getPosition: (event, selection) ->
- return unless event
- width = parseFloat @element.css 'outline-width'
- offset = width + parseFloat @element.css 'outline-offset'
return position =
- top: @element.offset().top - @toolbar.outerHeight() - offset
- left: @element.offset().left - offset
+ top: 0
+ left: 0
_getCaretPosition: (range) ->
tmpSpan = jQuery "<span/>"

0 comments on commit a8acb0e

Please sign in to comment.