Should web browser let you control CTRL/CMD + W?
We are building a web app for web developers. For pros. For power users. For you. And it has tabs.
Instinctively, I want to close them with CTRL + W. Not just want - I did several times. Yeah, I was annoyed!
Well, it’s easy, right?
document.addEventListener('keydown', function(e) {
if ((e.ctrlKey || e.metaKey) && e.key === 'w') {
e.preventDefault();
CloseComponentTab();
}
});
Were you as naive as me?
You can not take away control from the browser acting on these basic UI shortcuts and other events.
So - why? And should you be able to?
