Skip to content

158-jumping-cursor #159

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

Merged
merged 1 commit into from
Jul 20, 2019
Merged

Conversation

MartinKavik
Copy link
Member

#158
It seems that jumping cursor is caused by fighting set_values - when I comment-out two calls, it works (see changes).

Also we can add returns to its body for a small performance improvement.

(This is only draft PR to show code changes)

@MartinKavik MartinKavik mentioned this pull request Jun 21, 2019
@David-OConnor
Copy link
Member

I need to do more homework on the consequences of removing these

@David-OConnor
Copy link
Member

Haven't dove in yet, but of note:
-I can confirm this fixes the problem for me.
-Related merged PRs, that introduced this set_value.
#53
#54

@MartinKavik MartinKavik force-pushed the fix/158-jumping-cursor branch 2 times, most recently from 4067e87 to 93e1842 Compare July 19, 2019 21:54
@MartinKavik MartinKavik force-pushed the fix/158-jumping-cursor branch from 93e1842 to 8ad1a2f Compare July 19, 2019 23:10
@MartinKavik
Copy link
Member Author

Issue should be resolved with this PR.

Smaller changes

  • Resolved // todo: Unable to get this convenience function working from util.rs.
    • See new related todos in utils.rs:176.
  • Updated example_e.rs:
    • It contains a form with many controls for testing inputs.
    • Backend processes received multipart data so this example can be used as example for file upload.

Main change

  • HtmlElement value handling refactored:
    • events.rs: Many rows deleted, I think it should be used only for handling user's callbacks, not for changing DOMs (it's VirtualDOM's work).
    • websys_bridge: New function set_default_element_state which set default (initial) state for elements. This function should be as short as possible.
    • patch.rs: Resolved // todo ideally we unify attach as one method.
    • util.rs: I tried to properly implement get/set_value / get/set_checked for Html**Elementss.

Breaking changes

  • There shouldn't be any.

@MartinKavik MartinKavik marked this pull request as ready for review July 19, 2019 23:12
@David-OConnor
Copy link
Member

Nice. Much cleaner than the way I had it before.

@David-OConnor David-OConnor merged commit c8b3b5d into seed-rs:master Jul 20, 2019
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

Successfully merging this pull request may close these issues.

2 participants