« first day (4532 days earlier)      last day (420 days later) » 

 
 
3 hours later…
4:18 AM
@JBis what is it?
 
 
1 hour later…
5:28 AM
If any JS whiz's can offer a helping hand on this question, I'd be super grateful:
0
Q: JavaScript: Prevent iOS keyboard + url bar from covering content

duhaimeI have the following DOM layout: #container { position: fixed; top: 0; right: 0; bottom: 0; left: 0; height: 100vh; } #scroll-container { position: absolute; top: 25px; right: 0; bottom: 0; left: 0; overflow: auto; } <div id='container'> <input placeholder='Hi' aut...

 
 
4 hours later…
9:18 AM
hello, what is the best way to trigger click event twice without being ridiculous? $('selector').trigger('click').trigger('click'); or two lines of $('selector').trigger('click'); ?
 
@cagatay117 Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
 
3 hours later…
12:04 PM
@cagatay117 really I think if it works widely on all supported devices and browsers I think it’s ok to just flip the coin and pick one.
Here’s your code without being messy: HTMLElement.prototype.clickTwice = function() { this.click(), this.click(); }
Then you would just call it like this: document.querySelector("selector").clickTwice();
 
 
7 hours later…
7:20 PM
@ParkingMaster Don't extend built-ins. MooTools already showed this was a terrible practice. Also all the other code that tries to add "conveniences" to shared objects. For reference, C# has this issue with extension methods. Common one is .ForEach() being added and if two libraries do it or your code and a library, then you have a problem. Or if you add a method now and .NET decides to add in the future. Which is sort of what happened with MooTools but in JS land.
 

« first day (4532 days earlier)      last day (420 days later) »