Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

Truncate the button text correctly when the parent has padding #395

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ptsampoukas
Copy link

The calculation that truncates the button text to fit the available space (in function getButtonText) assumes that the whole offsetWidth of the parent element is available for the button. But the padding and border is not available for the button (reference: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetWidth), which can lead to the button overflowing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant