question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disabling Auto-Fit?

See original GitHub issue

Is there any way to disable the way the color-picker “auto fits” to the visible screen area?

This is happening in my app and the color picker gets moved to an area that covers up my UI and leaves the user unable to click the necessary buttons to choose a color or close the color picker.

Could I add a PR to pass this as a setting parameter when initiating? Or would this be something easy you could do?

EDIT: I see there’s a fit hook that gets called when the color picker gets auto fitted, but there doesn’t seem to be any easy way to “undo” or cancel the auto fit using that hook.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
evolrosscommented, Apr 10, 2019

Circling back to this. I figured it out. Your very first suggestion/example was correct. I wasn’t setting a placement element as the third param to the constructor. That’s why overriding picker.fit wasn’t working. Once I set a placement element, I could dial in the location perfectly using:

picker.fit = function() {
   //  Don't autofit picker - always set static location
   this.self.style.top = "34px";
   this.self.style.left = "37px"; 
};
0reactions
taufik-nurrohmancommented, Nov 2, 2018

You can now use this.self.offsetLeft within the scope.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Turn Off Automatic Text Resizing in PowerPoint
You can turn off or stop automatic text resizing in PowerPoint by changing Autofit options. PowerPoint's Autofit feature is set to automatically ...
Read more >
How to Disable Auto Fit for Text in PowerPoint
To disable auto fit, click a text-box and select Size and Position. ... You can disable auto fit by selecting the Do not...
Read more >
How to turn off Autofit automatic text resizing feature in ...
Select the 'Do not Autofit' option seen there. When done, click inside the text box and type something you would like to add...
Read more >
How Do I Turn Off AutoFit in Word Tables?
Select your table, and right click on the anchor to bring up the Table Properties menu. Click on "Table Properties...", then in the...
Read more >
Why PowerPoint AutoFit is the Worst Feature in PowerPoint
How to Turn Off AutoFit · First, pick File > Options and then Proofing. · From here, move to the AutoFormat As You...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found