Fix border behavior when in readonly mode.