Skip to content
Merged
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
8 changes: 7 additions & 1 deletion packages/rich-text/src/component/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,18 @@ const INSERTION_INPUT_TYPES_TO_IGNORE = new Set( [
*/
const whiteSpace = 'pre-wrap';

/**
* A minimum width of 1px will prevent the rich text container from collapsing
* to 0 width and hiding the caret. This is useful for inline containers.
*/
const minWidth = '1px';

/**
* Default style object for the editable element.
*
* @type {Object<string,string>}
*/
const defaultStyle = { whiteSpace };
const defaultStyle = { whiteSpace, minWidth };

const EMPTY_ACTIVE_FORMATS = [];

Expand Down