gilesdring,
@gilesdring@mastodon.me.uk avatar
jamesjefferies,
@jamesjefferies@mastodon.me.uk avatar

@gilesdring I’ve used that in a few places over the years, would be nice to use something better! 😆

gilesdring,
@gilesdring@mastodon.me.uk avatar

@jamesjefferies I mean, it looks lovely. Someone is using it to replace the default behaviour of a select element so it “looks nice”. This then stops the original component from working. 🤦🏻‍♂️

jamesjefferies,
@jamesjefferies@mastodon.me.uk avatar

@gilesdring oh dear, I’ve used it with a bootstrap theme (I know) and the multi-select tag thing and it seemed to do the job quite well - makes for flaky tests though 😬

gilesdring,
@gilesdring@mastodon.me.uk avatar

@jamesjefferies it’s basically because jQuery starts meddling around with a component that was originally written in Svelte… they’ve each got their opinions about who is in control.

jamesjefferies,
@jamesjefferies@mastodon.me.uk avatar

@gilesdring meep!

gilesdring,
@gilesdring@mastodon.me.uk avatar

@jamesjefferies Luckily, Svelte (which compiles down to plain JS) exposes a really nice $set() method from its proxy. This can be used to poke state updates in from the outside. Even though jQuery has hijacked the select control and (seemingly) broken event propagation, it’s still working via a somewhat circuitous route.

gilesdring,
@gilesdring@mastodon.me.uk avatar

@jamesjefferies Apologies for using you as an unwitting rubber duck here! It has actually been really helpful!!!

https://en.m.wikipedia.org/wiki/Rubber_duck_debugging

jamesjefferies,
@jamesjefferies@mastodon.me.uk avatar

@gilesdring always happy to be a rubber duck 😆 I find incorporating jQuery into modern stuff can be really tricky, much as I still rate jQuery, it can be a party pooper

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • mdbf
  • ngwrru68w68
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • osvaldo12
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • InstantRegret
  • tacticalgear
  • anitta
  • ethstaker
  • provamag3
  • cisconetworking
  • tester
  • GTA5RPClips
  • cubers
  • everett
  • modclub
  • megavids
  • normalnudes
  • Leos
  • JUstTest
  • lostlight
  • All magazines