Edit directive for safari compatibility