Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Color editor is cut off when you scroll right #2218

Closed
peterflynn opened this issue Nov 27, 2012 · 8 comments
Closed

Color editor is cut off when you scroll right #2218

peterflynn opened this issue Nov 27, 2012 · 8 comments
Assignees
Milestone

Comments

@peterflynn
Copy link
Member

  1. Open a file that has a horizontal scrollbar
  2. Open the inline color picker somewhere in it
  3. Scroll to the right

Result: the entire inline widget, including gray background and top/bottom edge shadows, ends at the edge of the leftmost viewport -- when you scroll to the right there's nothing there but blank space.

Expected: like an inline text editor, the background and shadows should extend all the way across.

@peterflynn
Copy link
Member Author

@njx, @GarthDB: kind of an ugly cosmetic bug... do you think it's worth trying to fix for Sprint 17?

@GarthDB
Copy link
Member

GarthDB commented Nov 27, 2012

Is it specific to just color? How is the CSS inline editor getting around
this?

On Monday, November 26, 2012, Peter Flynn wrote:

@njx https://github.com/njx, @GarthDB https://github.com/GarthDB:
kind of an ugly cosmetic bug... do you think it's worth trying to fix for
Sprint 17?


Reply to this email directly or view it on GitHubhttps://github.com//issues/2218#issuecomment-10747989.

@njx
Copy link
Contributor

njx commented Nov 27, 2012

Oh duh. I had seen this, but I had in the back of my head that we had the same bug in the other inline editors, which I think was true at one point but isn't true now. (I'm not sure why I thought we would have continued to ship with that bug...)

We basically need to set the min-width of the widget to the host editor's lineSpace width. We should probably put this logic in the inline widget base class, although the other inline editors (which all happen to be MultiRangeInlineEditors) still need custom logic for this case. I'll see if I can come up with a reasonable fix.

@ghost ghost assigned njx Nov 27, 2012
@njx
Copy link
Contributor

njx commented Nov 27, 2012

(Deleted spurious comment about min-width which turned out not to be true.)

@peterflynn
Copy link
Member Author

Pull #2222 fixed the bug described above, but causes an inverse bug to occur: when the document is edited to reduce the text width, the inline colorpicker remains too wide and props the horizontal scrolling open. Moving to Sprint 18 to track that work.

@pthiess
Copy link
Contributor

pthiess commented Nov 28, 2012

reviewed @peterflynn Should we file a new bug for the injection bug and close this one?

@njx
Copy link
Contributor

njx commented Dec 5, 2012

This will be fixed when I fix #2221.

njx added a commit that referenced this issue Dec 6, 2012
…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.
@peterflynn
Copy link
Member Author

Confirmed fixed via testing in #2285.

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

No branches or pull requests

4 participants