Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Toolbar width no longer limited to editable content width #129

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions src/toolbar/fixed.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@
jQuery(window).resize (event) =>
@setPosition()

# Make sure the toolbar has not got the full width of the editable
# element when floating is set to true
if @options.parentElement is 'body'
el = jQuery(@element)
widthToAdd = parseFloat el.css('padding-left')
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
jQuery(@toolbar).css "width", el.width() + widthToAdd

_getPosition: (event, selection) ->
return unless event
width = parseFloat @element.css 'outline-width'
Expand Down