question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] The `on` modifier does not work with the `modifier` helper

See original GitHub issue

🐞 Describe the Bug

This works:

<div {{(if this.condition (modifier 'my-modifier' this.bar))}}>

🔬 Minimal Reproduction

This doesn’t:

<div {{(if this.condition (modifier 'on' 'scroll' this.bar))}}>

Can’t create a Twiddle because Twiddle is severely outdated, sorry.

😕 Actual Behavior

Uncaught Error: Assertion Failed: Attempted to invoke (-resolve "modifier:on"), but on was not a valid modifier name.

🤔 Expected Behavior

Should apply the on modifier to the element.

🌍 Environment

  • Ember: 3.28.4
  • Node.js/npm: 14.16.0
  • OS: Build: Ubuntu, Browser: Windows 10
  • Browser: Chrome, Firefox

CC @simonihmig

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:6
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
chancancodecommented, Apr 12, 2022

Yes, this should work. In addition to fixing this bug we should also do a pass on all the other helpers/modifiers/keywords/RFCs we have to see if there is anything else missing, but they don’t have to block each other.

0reactions
chancancodecommented, Apr 1, 2022

Presumably on isn’t the only case? Are there other built-in things that doesn’t work?

Read more comments on GitHub >

github_iconTop Results From Across the Web

106073 – [quick fix] Remove invalid modifiers does not ... - Bugs
Hi, When I write the bad statement "static private SomeConstructor() {", Eclipse gives me a hint to remove the invalid modifier "static", but...
Read more >
Conditional Modifiers and Helpers in Ember - Chris Krycho
To conditionally apply a modifier in a template, you must reference that modifier using the modifier helper in the template, with a conditional ......
Read more >
SwiftUI ViewModifier not working as a NavigationLink
The modifier doesn't work because the content argument is not the actual view being modified, but instead is a proxy: content is a...
Read more >
Bug #1399071: Cinemachine 2.8.4 appears to be incomptable ...
Library\PackageCache\com.unity.cinemachine@2.8.4\Runtime\Helpers\CinemachineInputProvider.cs(99,13): error CS0106: The modifier 'static' is ...
Read more >
Bug #1797352 “Fix Ctrl+Shift and other modifier keys as input-so ...
The problem with function gtk_accelerator_valid(keyval, modifiers), which always return ... Description: helper application for the GNOME Flashback session
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found