1.21 gigawatts
1.21 gigawatts

Reputation: 17762

Is there a way to tell if the replace is visible in the search box?

Is there a way to tell if the replace field in a search box is visible?

I'm currently using the following to check if the search box is visible:

var isVisible = editor.searchBox.element.style.display != "none";

Upvotes: 0

Views: 74

Answers (1)

1.21 gigawatts
1.21 gigawatts

Reputation: 17762

It looks like there is a flag for it:

var isSearchVisible = editor.searchBox.element.style.display != "none";
var isReplace = editor.searchBox.isReplace;

var isReplaceVisible = isReplace && isSearchVisible;

Upvotes: 1

Related Questions