Bug 1207088 - Don't show the "Choose folder..." button for a directory picking <input> on platforms that don't have a directory picker. r=jfkthame

This commit is contained in:
Jonathan Watt
2015-09-16 11:42:27 +01:00
parent 3baff2531b
commit 9a70a91b0a
2 changed files with 10 additions and 2 deletions

View File

@@ -4848,6 +4848,9 @@ HTMLInputElement::ChooseDirectory(ErrorResult& aRv)
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
return;
}
// Script can call this method directly, so even though we don't show the
// "Pick Folder..." button on platforms that don't have a directory picker
// we have to redirect to the file picker here.
InitFilePicker(
#if defined(ANDROID) || defined(MOZ_B2G)
// No native directory picker - redirect to plain file picker