Fix hotkeys for edge browser control (#6344)

Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com>
This commit is contained in:
Christian Günter 2023-07-16 10:26:50 +02:00 committed by GitHub
parent 426edc3721
commit 0fa7ba96b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1666,14 +1666,22 @@ Hotkeys.prototype.showHotkeys = function() {
}
};
Hotkeys.prototype.getAllSapEventsForSapEventName = function(sSapEvent) {
return [].slice.call(
document.querySelectorAll('a[href*="sapevent:' + sSapEvent + '"],'
+ 'a[href*="SAPEVENT:' + sSapEvent + '"],'
+ 'input[formaction*="sapevent:' + sSapEvent + '"],'
+ 'input[formaction*="SAPEVENT:' + sSapEvent + '"],'
+ 'form[action*="sapevent:' + sSapEvent + '"] input[type="submit"].main,'
+ 'form[action*="SAPEVENT:' + sSapEvent + '"] input[type="submit"].main'));
Hotkeys.prototype.getAllSapEventsForSapEventName = function (sSapEvent) {
if (/^#+$/.test(sSapEvent)){
// sSapEvent contains only #. Nothing sensible can be done here
return [];
}
var includesSapEvent = function(text){
return (text.includes("sapevent") || text.includes("SAPEVENT"));
};
return [].slice
.call(document.querySelectorAll("a[href*="+ sSapEvent +"], input[formaction*="+ sSapEvent+"]"))
.filter(function (elem) {
return (elem.nodeName === "A" && includesSapEvent(elem.href)
|| (elem.nodeName === "INPUT" && includesSapEvent(elem.formAction)));
});
};
Hotkeys.prototype.getSapEventHref = function(sSapEvent) {