-
Notifications
You must be signed in to change notification settings - Fork 948
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
Text.value not updated when pasting using mouse #1401
Comments
What browser, version, and operating system is this on? |
Chrome & Firefox on Ubuntu 14.04, ipwidgets version 6.0.0
|
I am happy to generate an AWS hosted sample notebook if that helps. I LOVE jupyter and ipywidgets! |
Ah, looking at the code it looks like we explicitly look for key events:
Perhaps we should instead listen for the |
Would you like to work on this? PRs are definitely welcome! |
I am not a web developer, and I don't have very good understanding of web events. If It weren't for these widgets I would be lost. I am not adverse to helping out, but just not sure you want me mucking around in the code! For me, (ideally) the value of the I really appreciate you having a look at this issue. |
I think with the input event, the change would actually happen immediately, without blurring the input. We have two modes for the text widget - continuous updates (using keypress events) and non-continuous updates (again using keypress events, but listening for the enter key specifically). I think we should experiment with changing these two modes to using the |
Another option would be to attach an event handler like Button click, so by default the value is always synced, but if you only want it on blur, you'd have to attach a event handler. I think that would be more flexible. |
I guess what I'm suggesting is that mouse events should trigger the Text value to be set just like key events. |
I understand, and I agree. But at the same time we may tackle how to deal with different use cases for when you want other behaviour. Update while typeing, or only on losing focus or hitting enter. |
Sounds good. I can't say I understand the different options completely, if you think you have options to provide the additional functionality I would be happy with any solution. I recoginize this is probably considered an edge case, but it would certainly improve the usability of my notebooks, which are actually beign shared with many of our clients. I have a visualization tool that requires users to enter a UUID, which is quite painful to type by hand, so cut-and-paste entry is typical. Currently I have to tell users to hit enter or tab before pressing the "run" button. |
This is fixed in #1545. |
I have a Text widget, that will have a long uuid pasted into it. The "on_change" event is not fired if I right-click and paste the value. Below the Text widget I have a Button that relies on the value of the Text widget being set. Currently the only way to ensure the Text value is set, is for the user to press a navigation key (enter, tab, arrow), which seems to trigger the "on_change" event.
This is rather disappointing user experience, any thoughts ?
The text was updated successfully, but these errors were encountered: