mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-29 18:25:45 +01:00
Fix feeding pseudo-keys like <page-info>.
--HG-- branch : key-processing
This commit is contained in:
@@ -654,11 +654,17 @@ var Events = Module("events", {
|
|||||||
* <S-@> where @ is a non-case-changeable, non-space character.
|
* <S-@> where @ is a non-case-changeable, non-space character.
|
||||||
*
|
*
|
||||||
* @param {string} keys The string to parse.
|
* @param {string} keys The string to parse.
|
||||||
|
* @param {boolean} unknownOk Whether unknown keys are passed
|
||||||
|
* through rather than being converted to <lt>keyname>.
|
||||||
|
* @default false
|
||||||
* @returns {Array[Object]}
|
* @returns {Array[Object]}
|
||||||
*/
|
*/
|
||||||
fromString: function (input, unknownOk) {
|
fromString: function (input, unknownOk) {
|
||||||
let out = [];
|
|
||||||
|
|
||||||
|
if (arguments.length === 1)
|
||||||
|
unknownOk = true;
|
||||||
|
|
||||||
|
let out = [];
|
||||||
let re = RegExp("<.*?>?>|[^<]|<(?!.*>)", "g");
|
let re = RegExp("<.*?>?>|[^<]|<(?!.*>)", "g");
|
||||||
let match;
|
let match;
|
||||||
while ((match = re.exec(input))) {
|
while ((match = re.exec(input))) {
|
||||||
@@ -1027,12 +1033,11 @@ var Events = Module("events", {
|
|||||||
let duringFeed = this.duringFeed || [];
|
let duringFeed = this.duringFeed || [];
|
||||||
this.duringFeed = [];
|
this.duringFeed = [];
|
||||||
try {
|
try {
|
||||||
if (this.feedingEvent && [!(k in event) || event[k] === v for ([k, v] in Iterator(this.feedingEvent))].every(util.identity)) {
|
if (this.feedingEvent)
|
||||||
for (let [k, v] in Iterator(this.feedingEvent))
|
for (let [k, v] in Iterator(this.feedingEvent))
|
||||||
if (!(k in event))
|
if (!(k in event))
|
||||||
event[k] = v;
|
event[k] = v;
|
||||||
this.feedingEvent = null;
|
this.feedingEvent = null;
|
||||||
}
|
|
||||||
|
|
||||||
let key = events.toString(event);
|
let key = events.toString(event);
|
||||||
if (!key)
|
if (!key)
|
||||||
|
|||||||
Reference in New Issue
Block a user