You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior:
If I want an element focused on render, but I'm not interested in keeping track of its focus state after that, I might do something like this:
<buttonfocus.one-time="true">My Button</button>
In this case, attaching event listeners to the element only results in needless overhead.
Expected/desired behavior:
The Focus custom attribute should check if the binding mode is two-way and if not, should not attach event listeners to the element.
The text was updated successfully, but these errors were encountered:
While we're on the subject: I would expect the default binding mode of focus to be one-way. I usually bind it to an expression that cannot be assigned to:
If focus changes and comes back to this link, I'll get an error:
Uncaught Error: Binding expression "item === defaultItem" cannot be assigned to.
I can't speak for other developers, but I expect the most common use-case for the focus attribute to set initial focus, not to keep a property updated on whether an item is focused or not.
I'm submitting a bug report
1.2.0
Please tell us about your environment:
Operating System:
Linux (Ubuntu)
Node Version:
6.9.4
NPM Version:
3.10.10
JSPM
JSPM 0.16.48
Browser:
Chrome 55
Language:
TypeScript 2.1.4
Current behavior:
If I want an element focused on render, but I'm not interested in keeping track of its focus state after that, I might do something like this:
In this case, attaching event listeners to the element only results in needless overhead.
Expected/desired behavior:
The Focus custom attribute should check if the binding mode is two-way and if not, should not attach event listeners to the element.
The text was updated successfully, but these errors were encountered: