Skip to content

Editable text should stop being edited on other interactions #1437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alexcjohnson opened this issue Mar 2, 2017 · 1 comment
Closed

Editable text should stop being edited on other interactions #1437

alexcjohnson opened this issue Mar 2, 2017 · 1 comment
Labels
bug something broken

Comments

@alexcjohnson
Copy link
Collaborator

Discovered when fiddling with the legend for #1432 - if you make a plot in {editable: true} mode and click on some element that's editable as text (legend text, plot title, axis title, axis end), it becomes a text entry you can type in. But it doesn't go away nearly as easily as it should. As far as I can tell currently you need to either accept a new value with <enter>, cancel with <esc>, click on a different text-edit field, or click somewhere that has no interactions at all (like the outer border of the plot). But if you click or drag anywhere that has another interaction, the text entry sticks around - even if it's no longer where it should be, like if you drag the legend out from under it!

@alexcjohnson alexcjohnson added the bug something broken label Mar 2, 2017
rpaskowitz pushed a commit to rpaskowitz/plotly.js that referenced this issue Mar 3, 2017
Introduces a global _editing flag to be able to block other interactions while edit is in progress. Could be one solution for plotly#1437.

This makes it more clear that there should be some refactor to consolidate the double click behavior, since when the drag layer is on, that code path's click detection is used. The other path needs to remain since the drag layer doesn't exist when editable: false, but it's now easier to picture a world where these two paths converge.
@gvwilson
Copy link
Contributor

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

2 participants