vanadium-archive / browser

Example app: Vanadium namespace browser
BSD 3-Clause "New" or "Revised" License
1 stars 3 forks source link

paper-autocomplete input event in mercury #30

Closed aghassemi closed 9 years ago

aghassemi commented 9 years ago

When the input event fires in mercury, the value of the paper-autocomplete is the value before the key event.

That means that we get a value, 1 character earlier than we ought to. Seems like a 0 ms setTimeout solves that since the paper-autocomplete will shortly update itself to the correct value.

afandria commented 9 years ago

Mercury goes through capturing mode on the document to obtain events. This means that paper-autocomplete is given the event before its internal input. If this event is ignored in the capturing direction, then this setTimeout workaround could potentially be avoided.

afandria commented 9 years ago

The event is never received in bubbling mode via mercury. One alternative is to attach the event handler directly to the component and ensure that it only ever gets added once. However, that approach is worse than setting a timeout.

Closing this issue since this won't be fixed.