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

Fixing issue with cursor jumping in Safari #2506 #2511

Merged
merged 1 commit into from
Apr 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/compile/render-dom/wrappers/Element/Binding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default class BindingWrapper {

let update_conditions: string[] = this.needs_lock ? [`!${lock}`] : [];

const dependency_array = [...this.node.expression.dependencies]
const dependency_array = [...this.node.expression.dependencies];

if (dependency_array.length === 1) {
update_conditions.push(`changed.${dependency_array[0]}`)
Expand All @@ -121,6 +121,14 @@ export default class BindingWrapper {
)
}

if (parent.node.name === 'input') {
const type = parent.node.get_static_attribute_value('type');

if (type === null || type === "" || type === "text") {
update_conditions.push(`(${parent.var}.${this.node.name} !== ${this.snippet})`)
}
}

// model to view
let update_dom = get_dom_updater(parent, this);

Expand Down