-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Handle editor width resize in InlineWidget #2221
Comments
I wonder... the code in MultiRangeInlineEditor says we can't simply set the width to 100% because the DOM node has padding. But if we used |
No, that's not the reason we have to set min-width manually. It's because setting it to 100% sets it to 100% of the scroller's clientWidth, not 100% of the scrollWidth. (Widgets aren't children of the lineSpace in our implementation--they're parented directly into the scroller.) |
Adding to sprint 18 since it's related to #2220 which I'm looking at. |
…get base class. This addresses #2221 and #2218. As part of this, cleaned up some issues around how we're doing inheritance: * For #872, switched to using `Object.create()` to hook up prototypes (this avoids subtle bugs when binding event handlers in base classes). * Made it so all child classes call base class implementation for overridden functions (even if the base class impl is empty right now). The one exception is `close()`, which is a bit weird right now--will file a separate issue on this.
NJ's changes have landed, so closing. (Note also the confusion above about why 100% width doesn't work has been clarified in the docs, which are now in InlineWidget). |
Currently, each inline widget needs to manage its own width when the host editor resizes. We should provide reasonable default behavior for this which can be overridden. The default behavior in InlineColorEditor is probably what we want to use.
The text was updated successfully, but these errors were encountered: