Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 09 19:40
    dependabot[bot] labeled #114
  • Apr 09 19:39
    dependabot[bot] opened #114
  • Apr 09 19:39

    dependabot[bot] on npm_and_yarn

    Bump minimist from 1.2.5 to 1.2… (compare)

  • Mar 26 08:59
    dependabot[bot] labeled #113
  • Mar 26 08:59
    dependabot[bot] opened #113
  • Mar 26 08:59

    dependabot[bot] on npm_and_yarn

    Bump minimist from 1.2.5 to 1.2… (compare)

  • Feb 11 12:33
    dependabot[bot] labeled #112
  • Feb 11 12:33
    dependabot[bot] opened #112
  • Feb 11 12:33

    dependabot[bot] on npm_and_yarn

    Bump ajv from 6.6.1 to 6.12.6 … (compare)

  • Feb 10 12:19

    dependabot[bot] on npm_and_yarn

    (compare)

  • Feb 10 12:19
    dependabot[bot] closed #98
  • Feb 10 12:19
    dependabot[bot] commented #98
  • Feb 10 12:19
    dependabot[bot] labeled #111
  • Feb 10 12:19
    dependabot[bot] opened #111
  • Feb 10 12:19

    dependabot[bot] on npm_and_yarn

    Bump ua-parser-js from 0.7.19 t… (compare)

  • Jan 15 03:37
    dependabot[bot] labeled #110
  • Jan 15 03:37
    dependabot[bot] opened #110
  • Jan 15 03:37

    dependabot[bot] on npm_and_yarn

    Bump shelljs from 0.8.3 to 0.8.… (compare)

  • Oct 21 2021 14:30
    jelleklaver commented #108
  • Oct 21 2021 14:29
    ArthurClemens commented #108
Cory Mawhorter
@cmawhorter
i tried wrapping the body of the handler in a setTimeout and that doesn't work. i was just about to add a longer delay
Arthur Clemens
@ArthurClemens
Which mithril version are you using here?
Cory Mawhorter
@cmawhorter
1.1.7. and adding a 1s delay to that handler body firing (with a redraw added) makes the error go away
i guarantee its my code causing the problem. this thing was thrown together
Arthur Clemens
@ArthurClemens
You you try to change https://codesandbox.io/s/polythene-for-mithril-tabs-issue-with-mithril-1x-owvjo to your setup? (as this is working fine)
Cory Mawhorter
@cmawhorter
thanks, i'll take a look at that and see if i can get you any useful info. just in case it helps heres the full ugly function: https://gist.github.com/cmawhorter/0d4a8d73d607d2f93de73588ded6b502
something i neglected to mention is i'm using drawers with a key. not sure if that's part of the issue. i'll give your link a shot and find out
Cory Mawhorter
@cmawhorter
oooook. i think i have a repro. it seems to only happen when the tab body contains a lot of content
i tried adding an onbeforeremove to simulate a lot of teardown but that did nothing. it was only when i created a ton of nodes in a tab body that i could get it to happen
to get it to happen just switch between the tabs back and force rapidly and it'll eventually throw
no idea if drawer is involved
hmmm. though i'm not sure if that's my problem or just a different problem. my link still has the onbeforeremove delay and removing that makes that error go away. dfslkjfdklsjfklerjklwjlka
Cory Mawhorter
@cmawhorter
FWIW i'm giving up and wrapping the handler in a setTimeout and a delay
Arthur Clemens
@ArthurClemens
The tabs do work fine with Mithril 2.x
Cory Mawhorter
@cmawhorter
yeah, but mithril v2 has breaking changes and my app is large and i'm dev and QA. IMO you should unpublish anything > 1.5.4 and republish as v2 since anyone upgrading from 1.5 will experience breaking changes
or remove support for mithril v1
or maybe you could publish v1.5.5 w/deps fixed :heart: ;]
Arthur Clemens
@ArthurClemens
I’ll look into it
Cory Mawhorter
@cmawhorter
i tried to put together a PR but i'm having problems getting the dev env running. thanks for all the help now and in the past Arthur!
Arthur Clemens
@ArthurClemens
@cmawhorter You can now use fixed-version-1.5.6
Carlo Guglielmin
@cgug
Noticing the Polythene tabs reset their selected state on browser resize, so if I have tab 1 selected and resize it goes back to 0. Do I need to do a manual workaround for this or am I missing a param or something?
Arthur Clemens
@ArthurClemens
It’s a bug.
Arthur Clemens
@ArthurClemens
Fix is underway
Arthur Clemens
@ArthurClemens
Released in 1.7.5
Carlo Guglielmin
@cgug
Great, thanks a lot!
Another issue I noticed is in TextField using oninput, if you type a value in, then click to move the cursor to the start of the line, then rapidly type a lot of keys the caret eventually jumps to the end of the input. I figure it's something with oninput timing with the value, as using onchange instead avoids this behaviour
Carlo Guglielmin
@cgug
m(TextField, {
    label: 'Username',
    floatingLabel: true,
    value: username,
    events: {
        oninput: function(e) {
            username = e.target.value;
        }
    }
})
Arthur Clemens
@ArthurClemens
In which browser do you see this happen?
Carlo Guglielmin
@cgug
Chromium 87 and FF 84 on Linux
Arthur Clemens
@ArthurClemens
I don’t run Linux and I also don’t see it offered on BrowserStack. I’ll try some other browsers to see if I can reproduce it.
Carlo Guglielmin
@cgug
Also was reproducable on OS X
I can reboot to Windows and try there if that helps. Seems pretty consistent so I don't think the OS matters
Arthur Clemens
@ArthurClemens
I am using Mac OS with Chromium. I don’t see it happen on any field in the kitchensink: https://arthurclemens.github.io/polythene-demos/mithril/#/textfield
Carlo Guglielmin
@cgug
I tested there as well and couldn't reproduce it earlier. But do those have oninput linked up as well as value? Because if I remove the oninput event or switch it to onchange the problem is fixed
Arthur Clemens
@ArthurClemens
No, some use TextField prop onChange
Carlo Guglielmin
@cgug
Yeah, works fine with onchange, but not oninput
Arthur Clemens
@ArthurClemens
onChange (with capital C) is not the HTML function onchange
Carlo Guglielmin
@cgug
Do any of them have value? Because without that the issue is also fixed
Just tested, still jumps with onChange
Arthur Clemens
@ArthurClemens
Could you create a reproducable case using this flems as base?
Carlo Guglielmin
@cgug
Sure, just adding value to the TextField does it, here it is
Arthur Clemens
@ArthurClemens
Why do you need value?
Because value sets the input value
Carlo Guglielmin
@cgug
In some cases because we're loading a saved record from mongo and need to set it to the field initially
Arthur Clemens
@ArthurClemens
In that case you need defaultValue
Carlo Guglielmin
@cgug
Do you see the caret jump I was talking about in that flems?
Arthur Clemens
@ArthurClemens
I do see it with value, not with defaultValue
Carlo Guglielmin
@cgug
Okay, I'll use defaultValue where necessary, as I agree that fixes it. Thanks!
Arthur Clemens
@ArthurClemens
The documentation of value says: "Input value; this should normally not be set - for instance Safari will move the input to the end of the string at each change"