Added isClearButtonVisible mainly for testing purposes