Skip to content

Commit

Permalink
TextInput: gecko: fixed not working delete key
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Cecchetti <[email protected]>
Change-Id: I01ebbfb6c0d64fba044ae211d81b58a2f3ef06f9
  • Loading branch information
mcecchetti committed Jul 10, 2023
1 parent 6be9a99 commit d5cd0c6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions browser/src/layer/marker/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,13 @@ L.TextInput = L.Layer.extend({
}
this._emptyArea();
}
// Firefox is not able to delete the <img> post space. Since no 'input' event is generated,
// we need to handle a <delete> at the end of the paragraph, here.
if (L.Browser.gecko && this.getPlainTextContent().length === 0 && this._deleteHint === 'delete') {
window.app.console.log('Sending delete');
this._removeTextContent(0, 1);
this._emptyArea();
}
},

_isDigit: function(asciiChar) {
Expand Down

0 comments on commit d5cd0c6

Please sign in to comment.