Skip to content
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

"Cannot call this method on an empty rect" when holding backspace to delete formula characters on a slower machine #107

Open
wh1t3cAt1k opened this issue Jul 27, 2021 · 1 comment

Comments

@wh1t3cAt1k
Copy link

wh1t3cAt1k commented Jul 27, 2021

Reproduces reliably in PopupListWatcher for me when I am using a slower virtual machine and quickly delete formula symbols up until the opening bracket disappears (=FUNCTION("blah-blah" =>>> =FUNCTION)

image

It seems harmless otherwise, does not crash the app (probably due to a try/catch up the stack), but I wonder if it should be handled more gracefully.

@govert
Copy link
Member

govert commented Jul 27, 2021

I can't reproduce it myself, but I do find weird things happening from time to time, especially when debugging. So I'm happy to find one you can pin down - thank you!

I guess for this case we can just add a check to the condition:

                if (string.IsNullOrEmpty(text) || itemBounds == Rect.Empty)

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

No branches or pull requests

2 participants