Premature submitting of post on paste after newline


  • FoxDev

    ok. this can't just be a fluke it's happening too often.

    Reproduction steps:

    1. get some data on your clipboard. any old data will do,
    2. start a post in discourse.
    3. In rapid succession press ENTER ENTER CTRL+v to past contents in new paragraph

    Expected result: two carriage returns are entered and the clipboard content is pasted into the editor

    Actual result: often (altough not every time) the post will be submitted without the pasted content.

    I suspect this is because discourse is handling the CTRLENTER keyboard shortcut incorrectly. Probably by asking "is the CTRL button pressed now?" when processing an enter key, rather than asking the key event directly if any buckybits were set when the key was pressed.

    This has been reproduced by me on six different computers now, using three different browsers.


  • FoxDev

    Can repro, and fairly reliably too. You do have to be damn quick though.


    @accalia said:

    any old data

    https://www.youtube.com/watch?v=a4GdWK_WoNs

    DAMN YOU DEVICESUPPORT!!!

    Song is called 'Any Old Iron'.


  • FoxDev

    and with that confirmation:

    reported:



  • I must be missing something, because I don't see why this is a bug? As I understand it, I would reject this if it was submitted to me.


  • FoxDev

    because it's incorrect behavior.

    i never hit CTRL+ENTER in my repro steps so that hotkey should not activate.

    no other textbox in any browser i've used does that.



  • @accalia said:

    i never hit CTRL+ENTER in my repro steps so that hotkey should not activate.

    Huh, I cannot repo it.

    Are you sure Enter is not still down when you hit CTRL?



  • Repro steps below this:

    Reproduction steps:

    get some data on your clipboard. any old data will do,
    start a post in discourse.
    In rapid succession press ENTER ENTER CTRL+v to past contents in new paragraph

    After a few minutes of testing, I was UNABLE_TO_REPRO.

    If I got this as a bug report, I'd just put it at the bottom of the stack, solely based on the description. Such a low priority it isn't even worth trying to repro until there's nothing better to do.


  • FoxDev

    @abarker said:

    After a few minutes of testing, I was UNABLE_TO_REPRO.

    How would you suggest improving the bug report then? you have now two people who can reliably reproduce the bug. And this is the absolutely worst kind of bug to reproduce anyway: a timing bug?


  • FoxDev

    @jaming said:

    Are you sure Enter is not still down when you hit CTRL?

    yes i am. I did check that.


  • FoxDev

    @accalia said:

    you have now two people who can reliably reproduce the bug

    On multiple machines; can repro on my Surface (Type Keyboard) as well as my PC



  • @accalia said:

    How would you suggest improving the bug report then? you have now two people who can reliably reproduce the bug. And this is the absolutely worst kind of bug to reproduce anyway: a timing bug?

    I'm not sure. It sounds like the issue is likely dependent on the client system's configuration and load. Possibly even typing style. It might be helpful to know the following about your setup and @RaceProUK's setup:

    • What kind of keyboard are you using? (membrane v. mechanical, PS2 v USB, etc.)
    • Is it possible to reproduce the bug when the memory and CPU load on your system are minimal, or does your system need to be under a heavy processing load to repro?
    • What are the basic specs of your system? (CPU, RAM, OS, & browser are probably the most relevant)

    Having this information could help determine how to reproduce the bug on other systems. Heck, maybe one of you could write a script to reliably repro the bug.


  • FoxDev

    Logitech G15 Gaming Keyboard and Microsoft Surface Pro 3 Type Cover.

    Two more different keyboards you cannot get.


    Of course, if two people reproducing it across three browsers and eight computers isn't enough, then what is?



  • @RaceProUK said:

    Two more different keyboards you cannot get.

    So you eliminated one potential information vector. Congratulations?

    That's what debugging is: identifying potential vectors and ruling them out until you know what's going on so you can fix it.

    It wasn't my number one hypothesis anyway, so no big deal.


  • FoxDev

    @abarker said:

    So you eliminated one potential information vector.

    And Cali eliminated another; it happens in multiple browsers.

    Plus, we can rule out typing styles; the chances of my typing style matching Cali's are a million-to-one.


  • FoxDev

    Reproducable on:

    Membrane and mechanical keyboards (i have machiens with both types and both exhibit the bug.)

    • Logitech G710+ (mechanical)
    • Surface Pro 2 Type cover (membrane)
    • Logitech G510s (membrane)
    • Logitech K800 (membrane)
    • laptop keyboards (membrane, no known manufacturer other than "Google" and "HP")

    Reproducable on:

    • i7 32GB ram SSD
    • i3 8GB ram SSD
    • Celeron 4GB RAM HDD
    • I5 Surface
    • Chromebook Pixel 2015
    • Phenom x6 6GB ram HDD/SSD

    Machine load does not appear to be a correlating factor, but servercooties does make the issue easier to trigger. Also making the tab share a process with Salesforce also makes the bug easier to show.

    Bug demonstrated on Chrome 64bit 32+ as well as Firefox and IE10



  • I've been messing around in a PM to one of my sock, and the only way I can come close to a repro is by barely overlapping the second Enter with the Ctrl.

    Come up with a script that can do it (after all, scripts can type faster than people ;)), and I'd say you have a case. Otherwise, it looks like you two might need to just slow down a bit.


  • FoxDev

    @abarker said:

    Otherwise, it looks like you two might need to just slow down a bit.

    My normal typing speed never triggered the bug; I had to speed up considerably to trigger it. But when I found the right speed, I could trigger it almost at will.


  • I survived the hour long Uno hand

    @RaceProUK said:

    But when I found the right speed, I could trigger it almost at will.

    Do it with Selenium Webdriver. That'll literally send keys faster than a human can type, but it'll never overlap them. You can find bindings for Node if that's your most comfortable language.


  • FoxDev

    @Yamikuronue said:

    You can find bindings for Node if that's your most comfortable language.

    I would laugh, but… I do kinda like Node 😊

    Edit: C# bindings! Even better!

    Editit: Actually, Node's better; I can send the test program to TCoCDCK then without having to worry about the OS or anything 😄


  • I survived the hour long Uno hand

    I dunno if Selenium IDE can do modifier keys, but that also works for portability.


  • FoxDev

    an update to this one.

    @accalia said:

    @sam said:
    I can not repro this, I tried quite a few times, what browser is this?

    primarily Chrome, i've also gotten IE and Firefox to do it.

    It's much easier to reproduce when the site is having one of its slow moments, which is much more common on my home forum that it is here on meta.d. i have been able to reproduce it at steady state as well.

    Tested configurations that exhibit the issue:

    Membrane and mechanical keyboards (i have machines with both types and both types exhibit the bug.)

    Logitech G710+ (mechanical)
    Surface Pro 2 Type cover (membrane)
    Logitech G510s (membrane)
    Logitech K800 (membrane)
    laptop keyboards (membrane, no known manufacturer other than "Google" and "HP")

    Hardware (CPU, Ram size and hard drive type) reproducable on:

    i7 32GB ram SSD (Windows 8.1)
    i3 8GB ram SSD (Windows 8)
    Celeron 4GB RAM HDD (Windows 7)
    i5 Surface (Windows 8.1)
    Chromebook Pixel 2015 (Chrome OS)
    Phenom x6 6GB ram HDD/SSD (Windows 7)

    @RaceProUK said:

    You have to be really quick to trigger it

    also this. unless the site/editor is responding sluggishly you have to be really really fast to trigger it.


  • FoxDev

    That reminds me; I was going to put together an automated test case for them to use…


  • FoxDev

    oh. look nested quotes still have an issue.....

    is that a regression or am i imagining that that was fixed in the last beta?


  • FoxDev

    @accalia said:

    is that a regression or am i imagining that that was fixed in the last beta?

    You're imagining it; it's always been broken ;)


Log in to reply