Bug 558651 - "Check Spelling" should only be shown in context menu when input element is in 'text' or 'search' state. r=sdwilsh
This commit is contained in:
@@ -497,9 +497,9 @@ nsContextMenu.prototype = {
|
||||
}
|
||||
else if (this.target instanceof HTMLInputElement ) {
|
||||
this.onTextInput = this.isTargetATextBox(this.target);
|
||||
// allow spellchecking UI on all writable text boxes except passwords
|
||||
// Allow spellchecking UI on all text and search inputs.
|
||||
if (this.onTextInput && ! this.target.readOnly &&
|
||||
this.target.type != "password") {
|
||||
(this.target.type == "text" || this.target.type == "search")) {
|
||||
this.onEditableArea = true;
|
||||
InlineSpellCheckerUI.init(this.target.QueryInterface(Ci.nsIDOMNSEditableElement).editor);
|
||||
InlineSpellCheckerUI.initFromEvent(aRangeParent, aRangeOffset);
|
||||
|
||||
Reference in New Issue
Block a user