-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Rendering view document after focusing #3968
Comments
That's because for some strange reason there is no In this case, it would be perfect to call Unfortunately, the In my opinion, there are 2 things to do.
Note that it's renderer who should compare DOM and view and do nothing if there is no good reason to render anything. Observers should be free to call |
Small change after F2F talk with @pjasiun:
Regarding 1 – we can consider change the Regarding 2 – I wouldn't touch the sel obs now because it's a separate issue (not needed for this issue) and it may be really tricky. @pjasiun is reporting a separate ticket for that. |
Fix: View document is now re-rendered after focusing. Closes #795.
View document is rendered after each
blur
event but not after eachfocus
. This means that if selection is placed in the exact same place (without selection change event) document will not be re-rendered:Nested ediable updates its CSS class after being focused but it is not re-rendered so the blue outline is not showing when selection is placed in the exact same place.
I've tried to test if adding
viewDocument.render()
toFocusObserver
onfocus
event helps with this but unfortunately it is not working as expected. I think following things are happening when focusing nested editable:FocusObserver
setsviewDocument.isFocused
totrue
,render()
method is called, view elements are rendered,It looks like rendering on each focus event (which is fired when nested editable is focused) will not allow to put selection inside nested editable (because it will be rendered back to its position from view selection).
Any ideas how to solve it?
The text was updated successfully, but these errors were encountered: