I might understood wrong, but I think you want to use accept() not ignore().
ignore() will progate the event further, you want to stop the event, so I think accept() should be used.