Closed Bug 1199161 Opened 11 years ago Closed 11 years ago

Add selectedTextContent to CaretStateChangedEvent

Categories

(Core :: DOM: Selection, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: gasolin, Assigned: TYLin)

References

(Blocks 1 open bug)

Details

(Keywords: feature, foxfood)

Attachments

(3 files)

When we select a certain text, we can parse it and show the related actions when the text matches certain format. Such as 1. select a tel number or text starts with tel: and shows dial action in copy & paste float panel. press the action will trigger the dialer 2. select a short sentence and shows search or dictionary action. press the action will trigger browser or other search options
(2. may better served with support search providers via existing desktop opensearch addon) 3. select a url (without hyperlink) and shows `browser` action in float panel, press the action will trigger the browser
Depends on: 897445
in today's experiment, window.selection() fail because of system app can't directly access content inside of app window...
Attached file prove of concept —
It add a new button in float menu and can trigger an action. Need gecko support to get select string content from event.detail.
ni myself for the gecko support in comment 3.
Flags: needinfo?(tlin)
Attached image work flow diagram —
append workflow diagram to help communicate the idea
Bug 1199161 - Add selectedTextContent to CaretStateChangedEvent. r=kanru, sr=smaug The old SelectionStateChangedEvent dispatched by SelectionChanged had this field, but it has not being ported to CaretStateChangedEvent. We should include selected text in the event so that Gaia could have a chance to enhance user experience.
Attachment #8661719 - Flags: review?(kchen)
Attachment #8661719 - Flags: review?(bugs)
Flags: needinfo?(tlin)
Attachment #8661719 - Flags: superreview?(bugs)
Attachment #8661719 - Flags: superreview?(bugs)
Attachment #8661719 - Flags: superreview+
Attachment #8661719 - Flags: review?(bugs)
Attachment #8661719 - Flags: review+
Please help check in "Bug 1199161 - Add selectedTextContent to CaretStateChangedEvent."
Attachment #8661719 - Flags: review?(kchen)
Blocks: 1205650
Thanks TingYu! I'll prototyping the float menu action in bug 1205650
Assignee: nobody → tlin
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Summary: [feature] smarter copy & paster float panel to show related actions by matching patterns → Add selectedTextContent to CaretStateChangedEvent
No problem. Let's wait until the patch land on m-c then :-)
Status: RESOLVED → REOPENED
Keywords: leave-open
Resolution: FIXED → ---
Component: Gaia → Selection
Product: Firefox OS → Core
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: