Bug 1719703 - Implement cancel event on <input type=file>. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D119437
This commit is contained in:
@@ -441,7 +441,10 @@ HTMLInputElement::nsFilePickerShownCallback::Done(int16_t aResult) {
|
||||
mInput->PickerClosed();
|
||||
|
||||
if (aResult == nsIFilePicker::returnCancel) {
|
||||
return NS_OK;
|
||||
RefPtr<HTMLInputElement> inputElement(mInput);
|
||||
return nsContentUtils::DispatchTrustedEvent(
|
||||
inputElement->OwnerDoc(), static_cast<Element*>(inputElement.get()),
|
||||
u"cancel"_ns, CanBubble::eYes, Cancelable::eNo);
|
||||
}
|
||||
|
||||
int16_t mode;
|
||||
|
||||
Reference in New Issue
Block a user