Closed Bug 1370806 Opened 8 years ago Closed 8 years ago

Remove current selection before setting input.value

Categories

(Core :: DOM: Editor, enhancement)

55 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

nsIPlaintestEditor.setText still use BeginPlaceHolderTransaction and EndPlaceHolderTransaction. But since input.value setter doesn't create undo transaction, it is unnecessary to save/restore selection via AutoPlaceHolderBatch. Save/Restore selection is ~7% of input.value setter.
Blocks: 1346723
Comment on attachment 8875530 [details] Bug 1370806 - Part 1. Use RAII class for StartBatchChanges and EndBatchChanges. https://reviewboard.mozilla.org/r/146956/#review151158
Attachment #8875530 - Flags: review?(masayuki) → review+
Comment on attachment 8875531 [details] Bug 1370806 - Part 2. Remove selection before calling nsIPlaintextEditor.setText. https://reviewboard.mozilla.org/r/146958/#review151160
Attachment #8875531 - Flags: review?(masayuki) → review+
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/29687a739c34 Part 1. Use RAII class for StartBatchChanges and EndBatchChanges. r=masayuki https://hg.mozilla.org/integration/autoland/rev/efb90e3387f0 Part 2. Remove selection before calling nsIPlaintextEditor.setText. r=masayuki
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Depends on: 1376856
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: